lightning-sdk 0.2.4__py3-none-any.whl → 0.2.6__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/ai_hub.py +3 -1
- lightning_sdk/api/ai_hub_api.py +15 -0
- lightning_sdk/api/studio_api.py +0 -8
- lightning_sdk/cli/serve.py +29 -9
- lightning_sdk/deployment/deployment.py +32 -4
- lightning_sdk/lightning_cloud/openapi/__init__.py +57 -1
- lightning_sdk/lightning_cloud/openapi/api/__init__.py +4 -0
- lightning_sdk/lightning_cloud/openapi/api/cloud_space_environment_template_service_api.py +537 -0
- lightning_sdk/lightning_cloud/openapi/api/cluster_service_api.py +115 -6
- lightning_sdk/lightning_cloud/openapi/api/lit_dataset_service_api.py +1973 -0
- lightning_sdk/lightning_cloud/openapi/api/lit_registry_service_api.py +20 -4
- lightning_sdk/lightning_cloud/openapi/api/models_store_api.py +20 -20
- lightning_sdk/lightning_cloud/openapi/api/pipeline_templates_service_api.py +339 -0
- lightning_sdk/lightning_cloud/openapi/api/pipelines_service_api.py +5 -1
- lightning_sdk/lightning_cloud/openapi/api/schedules_service_api.py +573 -0
- lightning_sdk/lightning_cloud/openapi/api/slurm_jobs_user_service_api.py +202 -0
- lightning_sdk/lightning_cloud/openapi/models/__init__.py +53 -1
- lightning_sdk/lightning_cloud/openapi/models/cluster_id_capacityblock_body.py +15 -15
- lightning_sdk/lightning_cloud/openapi/models/cluster_id_slurmusers_body.py +201 -0
- lightning_sdk/lightning_cloud/openapi/models/dataset_id_versions_body.py +149 -0
- lightning_sdk/lightning_cloud/openapi/models/dataset_id_visibility_body.py +149 -0
- lightning_sdk/lightning_cloud/openapi/models/environmenttemplates_id_body.py +253 -0
- lightning_sdk/lightning_cloud/openapi/models/externalv1_cloud_space_instance_status.py +95 -69
- lightning_sdk/lightning_cloud/openapi/models/externalv1_cluster.py +27 -1
- lightning_sdk/lightning_cloud/openapi/models/litdatasets_dataset_id_body.py +149 -0
- lightning_sdk/lightning_cloud/openapi/models/orgs_id_body.py +27 -1
- lightning_sdk/lightning_cloud/openapi/models/pipelines_id_body.py +69 -17
- lightning_sdk/lightning_cloud/openapi/models/pipelinetemplates_id_body.py +331 -0
- lightning_sdk/lightning_cloud/openapi/models/project_id_cloudspaces_body.py +27 -1
- lightning_sdk/lightning_cloud/openapi/models/project_id_litdatasets_body.py +227 -0
- lightning_sdk/lightning_cloud/openapi/models/project_id_pipelines_body.py +17 -17
- lightning_sdk/lightning_cloud/openapi/models/project_id_schedules_body.py +201 -0
- lightning_sdk/lightning_cloud/openapi/models/schedules_id_body.py +383 -0
- lightning_sdk/lightning_cloud/openapi/models/server_id_alerts_body.py +175 -0
- lightning_sdk/lightning_cloud/openapi/models/slurm_jobs_body.py +15 -15
- lightning_sdk/lightning_cloud/openapi/models/upload_id_complete_body1.py +149 -0
- lightning_sdk/lightning_cloud/openapi/models/upload_id_parts_body1.py +149 -0
- lightning_sdk/lightning_cloud/openapi/models/v1_agent_job.py +124 -20
- lightning_sdk/lightning_cloud/openapi/models/v1_assistant_model_status.py +2 -0
- lightning_sdk/lightning_cloud/openapi/models/v1_cloud_provider.py +1 -0
- lightning_sdk/lightning_cloud/openapi/models/v1_cloud_space.py +27 -1
- lightning_sdk/lightning_cloud/openapi/models/v1_cloud_space_environment_template.py +279 -0
- lightning_sdk/lightning_cloud/openapi/models/v1_cloud_space_environment_template_config.py +123 -0
- lightning_sdk/lightning_cloud/openapi/models/v1_cluster_security_options.py +27 -1
- lightning_sdk/lightning_cloud/openapi/models/v1_cluster_spec.py +157 -1
- lightning_sdk/lightning_cloud/openapi/models/v1_complete_lit_dataset_multi_part_upload_response.py +97 -0
- lightning_sdk/lightning_cloud/openapi/models/v1_complete_lit_dataset_upload_response.py +97 -0
- lightning_sdk/lightning_cloud/openapi/models/v1_create_cloud_space_environment_template_request.py +175 -0
- lightning_sdk/lightning_cloud/openapi/models/v1_create_lit_dataset_multi_part_upload_response.py +123 -0
- lightning_sdk/lightning_cloud/openapi/models/v1_create_organization_request.py +27 -1
- lightning_sdk/lightning_cloud/openapi/models/v1_create_pipeline_template_request.py +383 -0
- lightning_sdk/lightning_cloud/openapi/models/v1_create_project_request.py +27 -1
- lightning_sdk/lightning_cloud/openapi/models/v1_create_server_alert_response.py +97 -0
- lightning_sdk/lightning_cloud/openapi/models/v1_data_connection.py +27 -1
- lightning_sdk/lightning_cloud/openapi/models/{v1_pipeline_schedule.py → v1_delete_cloud_space_environment_template_response.py} +32 -32
- lightning_sdk/lightning_cloud/openapi/models/v1_delete_lit_dataset_response.py +97 -0
- lightning_sdk/lightning_cloud/openapi/models/v1_delete_lit_dataset_version_response.py +97 -0
- lightning_sdk/lightning_cloud/openapi/models/v1_delete_schedule_response.py +175 -0
- lightning_sdk/lightning_cloud/openapi/models/v1_get_cloud_space_size_response.py +79 -1
- lightning_sdk/lightning_cloud/openapi/models/v1_get_lit_dataset_file_upload_urls_response.py +123 -0
- lightning_sdk/lightning_cloud/openapi/models/v1_get_lit_dataset_files_url_response.py +149 -0
- lightning_sdk/lightning_cloud/openapi/models/v1_get_user_response.py +27 -1
- lightning_sdk/lightning_cloud/openapi/models/v1_google_cloud_direct_v1.py +55 -3
- lightning_sdk/lightning_cloud/openapi/models/v1_instance_overprovisioning_spec.py +79 -27
- lightning_sdk/lightning_cloud/openapi/models/v1_job_spec.py +27 -1
- lightning_sdk/lightning_cloud/openapi/models/v1_lambda_labs_direct_v1.py +1 -29
- lightning_sdk/lightning_cloud/openapi/models/v1_list_cloud_space_environment_templates_response.py +123 -0
- lightning_sdk/lightning_cloud/openapi/models/v1_list_lit_dataset_versions_response.py +123 -0
- lightning_sdk/lightning_cloud/openapi/models/v1_list_lit_datasets_response.py +123 -0
- lightning_sdk/lightning_cloud/openapi/models/v1_list_lit_registry_repository_image_artifact_versions_response.py +27 -1
- lightning_sdk/lightning_cloud/openapi/models/v1_list_schedules_response.py +123 -0
- lightning_sdk/lightning_cloud/openapi/models/v1_list_slurm_cluster_users_response.py +123 -0
- lightning_sdk/lightning_cloud/openapi/models/v1_lit_dataset.py +539 -0
- lightning_sdk/lightning_cloud/openapi/models/v1_lit_dataset_file.py +175 -0
- lightning_sdk/lightning_cloud/openapi/models/v1_lit_dataset_version_archive.py +435 -0
- lightning_sdk/lightning_cloud/openapi/models/v1_lit_registry_project.py +27 -1
- lightning_sdk/lightning_cloud/openapi/models/v1_lit_repository.py +27 -1
- lightning_sdk/lightning_cloud/openapi/models/v1_magic_link_login_request.py +27 -1
- lightning_sdk/lightning_cloud/openapi/models/v1_managed_model.py +107 -3
- lightning_sdk/lightning_cloud/openapi/models/v1_metadata.py +27 -1
- lightning_sdk/lightning_cloud/openapi/models/v1_organization.py +53 -1
- lightning_sdk/lightning_cloud/openapi/models/v1_pipeline.py +69 -17
- lightning_sdk/lightning_cloud/openapi/models/v1_pipeline_parameter.py +435 -0
- lightning_sdk/lightning_cloud/openapi/models/v1_pipeline_parameter_placement.py +149 -0
- lightning_sdk/lightning_cloud/openapi/models/v1_pipeline_parameter_placement_type.py +106 -0
- lightning_sdk/lightning_cloud/openapi/models/v1_pipeline_parameter_type.py +106 -0
- lightning_sdk/lightning_cloud/openapi/models/v1_pipeline_template.py +513 -0
- lightning_sdk/lightning_cloud/openapi/models/v1_pipeline_template_visibility_type.py +105 -0
- lightning_sdk/lightning_cloud/openapi/models/v1_project_settings.py +27 -1
- lightning_sdk/lightning_cloud/openapi/models/v1_reservation_details.py +201 -0
- lightning_sdk/lightning_cloud/openapi/models/v1_rule_resource.py +1 -0
- lightning_sdk/lightning_cloud/openapi/models/v1_schedule.py +435 -0
- lightning_sdk/lightning_cloud/openapi/models/v1_schedule_resource_type.py +103 -0
- lightning_sdk/lightning_cloud/openapi/models/v1_server_alert.py +175 -0
- lightning_sdk/lightning_cloud/openapi/models/v1_server_alert_severity.py +103 -0
- lightning_sdk/lightning_cloud/openapi/models/v1_server_alert_type.py +105 -0
- lightning_sdk/lightning_cloud/openapi/models/v1_slurm_cluster_user.py +227 -0
- lightning_sdk/lightning_cloud/openapi/models/v1_slurm_job.py +58 -6
- lightning_sdk/lightning_cloud/openapi/models/v1_slurm_node.py +31 -291
- lightning_sdk/lightning_cloud/openapi/models/v1_subnet_spec.py +149 -0
- lightning_sdk/lightning_cloud/openapi/models/v1_update_lit_dataset_visibility_response.py +123 -0
- lightning_sdk/lightning_cloud/openapi/models/v1_update_user_request.py +27 -1
- lightning_sdk/lightning_cloud/openapi/models/v1_user_features.py +223 -171
- lightning_sdk/lightning_cloud/openapi/models/v1_validate_managed_endpoint_response.py +27 -1
- lightning_sdk/lightning_cloud/openapi/models/v1_voltage_park_direct_v1.py +203 -0
- lightning_sdk/lightning_cloud/openapi/models/v1_vultr_direct_v1.py +1 -27
- lightning_sdk/lightning_cloud/openapi/models/version_default_body.py +29 -29
- lightning_sdk/lightning_cloud/openapi/models/version_default_body1.py +149 -0
- lightning_sdk/lightning_cloud/openapi/models/version_uploads_body1.py +123 -0
- lightning_sdk/lightning_cloud/openapi/models/versions_version_body1.py +123 -0
- lightning_sdk/lightning_cloud/rest_client.py +44 -40
- lightning_sdk/pipeline/types.py +28 -2
- lightning_sdk/pipeline/utils.py +1 -1
- lightning_sdk/plugin.py +0 -6
- lightning_sdk/serve.py +5 -3
- lightning_sdk/utils/resolve.py +1 -0
- {lightning_sdk-0.2.4.dist-info → lightning_sdk-0.2.6.dist-info}/METADATA +1 -1
- {lightning_sdk-0.2.4.dist-info → lightning_sdk-0.2.6.dist-info}/RECORD +123 -67
- {lightning_sdk-0.2.4.dist-info → lightning_sdk-0.2.6.dist-info}/WHEEL +1 -1
- {lightning_sdk-0.2.4.dist-info → lightning_sdk-0.2.6.dist-info}/LICENSE +0 -0
- {lightning_sdk-0.2.4.dist-info → lightning_sdk-0.2.6.dist-info}/entry_points.txt +0 -0
- {lightning_sdk-0.2.4.dist-info → lightning_sdk-0.2.6.dist-info}/top_level.txt +0 -0
|
@@ -0,0 +1,105 @@
|
|
|
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 V1PipelineTemplateVisibilityType(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
|
+
"""
|
|
38
|
+
allowed enum values
|
|
39
|
+
"""
|
|
40
|
+
UNDEFINED = "PIPELINE_TEMPLATE_VISIBILITY_TYPE_UNDEFINED"
|
|
41
|
+
GLOBAL = "PIPELINE_TEMPLATE_VISIBILITY_TYPE_GLOBAL"
|
|
42
|
+
ORG = "PIPELINE_TEMPLATE_VISIBILITY_TYPE_ORG"
|
|
43
|
+
PROJECT = "PIPELINE_TEMPLATE_VISIBILITY_TYPE_PROJECT"
|
|
44
|
+
"""
|
|
45
|
+
Attributes:
|
|
46
|
+
swagger_types (dict): The key is attribute name
|
|
47
|
+
and the value is attribute type.
|
|
48
|
+
attribute_map (dict): The key is attribute name
|
|
49
|
+
and the value is json key in definition.
|
|
50
|
+
"""
|
|
51
|
+
swagger_types = {
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
attribute_map = {
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
def __init__(self): # noqa: E501
|
|
58
|
+
"""V1PipelineTemplateVisibilityType - a model defined in Swagger""" # noqa: E501
|
|
59
|
+
self.discriminator = None
|
|
60
|
+
|
|
61
|
+
def to_dict(self) -> dict:
|
|
62
|
+
"""Returns the model properties as a dict"""
|
|
63
|
+
result = {}
|
|
64
|
+
|
|
65
|
+
for attr, _ in six.iteritems(self.swagger_types):
|
|
66
|
+
value = getattr(self, attr)
|
|
67
|
+
if isinstance(value, list):
|
|
68
|
+
result[attr] = list(map(
|
|
69
|
+
lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
|
|
70
|
+
value
|
|
71
|
+
))
|
|
72
|
+
elif hasattr(value, "to_dict"):
|
|
73
|
+
result[attr] = value.to_dict()
|
|
74
|
+
elif isinstance(value, dict):
|
|
75
|
+
result[attr] = dict(map(
|
|
76
|
+
lambda item: (item[0], item[1].to_dict())
|
|
77
|
+
if hasattr(item[1], "to_dict") else item,
|
|
78
|
+
value.items()
|
|
79
|
+
))
|
|
80
|
+
else:
|
|
81
|
+
result[attr] = value
|
|
82
|
+
if issubclass(V1PipelineTemplateVisibilityType, dict):
|
|
83
|
+
for key, value in self.items():
|
|
84
|
+
result[key] = value
|
|
85
|
+
|
|
86
|
+
return result
|
|
87
|
+
|
|
88
|
+
def to_str(self) -> str:
|
|
89
|
+
"""Returns the string representation of the model"""
|
|
90
|
+
return pprint.pformat(self.to_dict())
|
|
91
|
+
|
|
92
|
+
def __repr__(self) -> str:
|
|
93
|
+
"""For `print` and `pprint`"""
|
|
94
|
+
return self.to_str()
|
|
95
|
+
|
|
96
|
+
def __eq__(self, other: 'V1PipelineTemplateVisibilityType') -> bool:
|
|
97
|
+
"""Returns true if both objects are equal"""
|
|
98
|
+
if not isinstance(other, V1PipelineTemplateVisibilityType):
|
|
99
|
+
return False
|
|
100
|
+
|
|
101
|
+
return self.__dict__ == other.__dict__
|
|
102
|
+
|
|
103
|
+
def __ne__(self, other: 'V1PipelineTemplateVisibilityType') -> bool:
|
|
104
|
+
"""Returns true if both objects are not equal"""
|
|
105
|
+
return not self == other
|
|
@@ -45,6 +45,7 @@ class V1ProjectSettings(object):
|
|
|
45
45
|
'allow_gcp_saas': 'bool',
|
|
46
46
|
'allow_lambda_saas': 'bool',
|
|
47
47
|
'allow_vultr_saas': 'bool',
|
|
48
|
+
'default_machine_image_version': 'str',
|
|
48
49
|
'preferred_cluster': 'str',
|
|
49
50
|
'preferred_deployment_provider': 'str',
|
|
50
51
|
'preferred_studio_provider': 'str',
|
|
@@ -57,6 +58,7 @@ class V1ProjectSettings(object):
|
|
|
57
58
|
'allow_gcp_saas': 'allowGcpSaas',
|
|
58
59
|
'allow_lambda_saas': 'allowLambdaSaas',
|
|
59
60
|
'allow_vultr_saas': 'allowVultrSaas',
|
|
61
|
+
'default_machine_image_version': 'defaultMachineImageVersion',
|
|
60
62
|
'preferred_cluster': 'preferredCluster',
|
|
61
63
|
'preferred_deployment_provider': 'preferredDeploymentProvider',
|
|
62
64
|
'preferred_studio_provider': 'preferredStudioProvider',
|
|
@@ -64,12 +66,13 @@ class V1ProjectSettings(object):
|
|
|
64
66
|
'start_studio_on_spot_instance': 'startStudioOnSpotInstance'
|
|
65
67
|
}
|
|
66
68
|
|
|
67
|
-
def __init__(self, allow_aws_saas: 'bool' =None, allow_gcp_saas: 'bool' =None, allow_lambda_saas: 'bool' =None, allow_vultr_saas: 'bool' =None, preferred_cluster: 'str' =None, preferred_deployment_provider: 'str' =None, preferred_studio_provider: 'str' =None, same_compute_on_resume: 'bool' =None, start_studio_on_spot_instance: 'bool' =None): # noqa: E501
|
|
69
|
+
def __init__(self, allow_aws_saas: 'bool' =None, allow_gcp_saas: 'bool' =None, allow_lambda_saas: 'bool' =None, allow_vultr_saas: 'bool' =None, default_machine_image_version: 'str' =None, preferred_cluster: 'str' =None, preferred_deployment_provider: 'str' =None, preferred_studio_provider: 'str' =None, same_compute_on_resume: 'bool' =None, start_studio_on_spot_instance: 'bool' =None): # noqa: E501
|
|
68
70
|
"""V1ProjectSettings - a model defined in Swagger""" # noqa: E501
|
|
69
71
|
self._allow_aws_saas = None
|
|
70
72
|
self._allow_gcp_saas = None
|
|
71
73
|
self._allow_lambda_saas = None
|
|
72
74
|
self._allow_vultr_saas = None
|
|
75
|
+
self._default_machine_image_version = None
|
|
73
76
|
self._preferred_cluster = None
|
|
74
77
|
self._preferred_deployment_provider = None
|
|
75
78
|
self._preferred_studio_provider = None
|
|
@@ -84,6 +87,8 @@ class V1ProjectSettings(object):
|
|
|
84
87
|
self.allow_lambda_saas = allow_lambda_saas
|
|
85
88
|
if allow_vultr_saas is not None:
|
|
86
89
|
self.allow_vultr_saas = allow_vultr_saas
|
|
90
|
+
if default_machine_image_version is not None:
|
|
91
|
+
self.default_machine_image_version = default_machine_image_version
|
|
87
92
|
if preferred_cluster is not None:
|
|
88
93
|
self.preferred_cluster = preferred_cluster
|
|
89
94
|
if preferred_deployment_provider is not None:
|
|
@@ -179,6 +184,27 @@ class V1ProjectSettings(object):
|
|
|
179
184
|
|
|
180
185
|
self._allow_vultr_saas = allow_vultr_saas
|
|
181
186
|
|
|
187
|
+
@property
|
|
188
|
+
def default_machine_image_version(self) -> 'str':
|
|
189
|
+
"""Gets the default_machine_image_version of this V1ProjectSettings. # noqa: E501
|
|
190
|
+
|
|
191
|
+
|
|
192
|
+
:return: The default_machine_image_version of this V1ProjectSettings. # noqa: E501
|
|
193
|
+
:rtype: str
|
|
194
|
+
"""
|
|
195
|
+
return self._default_machine_image_version
|
|
196
|
+
|
|
197
|
+
@default_machine_image_version.setter
|
|
198
|
+
def default_machine_image_version(self, default_machine_image_version: 'str'):
|
|
199
|
+
"""Sets the default_machine_image_version of this V1ProjectSettings.
|
|
200
|
+
|
|
201
|
+
|
|
202
|
+
:param default_machine_image_version: The default_machine_image_version of this V1ProjectSettings. # noqa: E501
|
|
203
|
+
:type: str
|
|
204
|
+
"""
|
|
205
|
+
|
|
206
|
+
self._default_machine_image_version = default_machine_image_version
|
|
207
|
+
|
|
182
208
|
@property
|
|
183
209
|
def preferred_cluster(self) -> 'str':
|
|
184
210
|
"""Gets the preferred_cluster of this V1ProjectSettings. # noqa: E501
|
|
@@ -0,0 +1,201 @@
|
|
|
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 V1ReservationDetails(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
|
+
'cost_per_hour': 'float',
|
|
45
|
+
'end_time': 'datetime',
|
|
46
|
+
'name': 'str',
|
|
47
|
+
'start_time': 'datetime'
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
attribute_map = {
|
|
51
|
+
'cost_per_hour': 'costPerHour',
|
|
52
|
+
'end_time': 'endTime',
|
|
53
|
+
'name': 'name',
|
|
54
|
+
'start_time': 'startTime'
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
def __init__(self, cost_per_hour: 'float' =None, end_time: 'datetime' =None, name: 'str' =None, start_time: 'datetime' =None): # noqa: E501
|
|
58
|
+
"""V1ReservationDetails - a model defined in Swagger""" # noqa: E501
|
|
59
|
+
self._cost_per_hour = None
|
|
60
|
+
self._end_time = None
|
|
61
|
+
self._name = None
|
|
62
|
+
self._start_time = None
|
|
63
|
+
self.discriminator = None
|
|
64
|
+
if cost_per_hour is not None:
|
|
65
|
+
self.cost_per_hour = cost_per_hour
|
|
66
|
+
if end_time is not None:
|
|
67
|
+
self.end_time = end_time
|
|
68
|
+
if name is not None:
|
|
69
|
+
self.name = name
|
|
70
|
+
if start_time is not None:
|
|
71
|
+
self.start_time = start_time
|
|
72
|
+
|
|
73
|
+
@property
|
|
74
|
+
def cost_per_hour(self) -> 'float':
|
|
75
|
+
"""Gets the cost_per_hour of this V1ReservationDetails. # noqa: E501
|
|
76
|
+
|
|
77
|
+
|
|
78
|
+
:return: The cost_per_hour of this V1ReservationDetails. # noqa: E501
|
|
79
|
+
:rtype: float
|
|
80
|
+
"""
|
|
81
|
+
return self._cost_per_hour
|
|
82
|
+
|
|
83
|
+
@cost_per_hour.setter
|
|
84
|
+
def cost_per_hour(self, cost_per_hour: 'float'):
|
|
85
|
+
"""Sets the cost_per_hour of this V1ReservationDetails.
|
|
86
|
+
|
|
87
|
+
|
|
88
|
+
:param cost_per_hour: The cost_per_hour of this V1ReservationDetails. # noqa: E501
|
|
89
|
+
:type: float
|
|
90
|
+
"""
|
|
91
|
+
|
|
92
|
+
self._cost_per_hour = cost_per_hour
|
|
93
|
+
|
|
94
|
+
@property
|
|
95
|
+
def end_time(self) -> 'datetime':
|
|
96
|
+
"""Gets the end_time of this V1ReservationDetails. # noqa: E501
|
|
97
|
+
|
|
98
|
+
|
|
99
|
+
:return: The end_time of this V1ReservationDetails. # noqa: E501
|
|
100
|
+
:rtype: datetime
|
|
101
|
+
"""
|
|
102
|
+
return self._end_time
|
|
103
|
+
|
|
104
|
+
@end_time.setter
|
|
105
|
+
def end_time(self, end_time: 'datetime'):
|
|
106
|
+
"""Sets the end_time of this V1ReservationDetails.
|
|
107
|
+
|
|
108
|
+
|
|
109
|
+
:param end_time: The end_time of this V1ReservationDetails. # noqa: E501
|
|
110
|
+
:type: datetime
|
|
111
|
+
"""
|
|
112
|
+
|
|
113
|
+
self._end_time = end_time
|
|
114
|
+
|
|
115
|
+
@property
|
|
116
|
+
def name(self) -> 'str':
|
|
117
|
+
"""Gets the name of this V1ReservationDetails. # noqa: E501
|
|
118
|
+
|
|
119
|
+
|
|
120
|
+
:return: The name of this V1ReservationDetails. # noqa: E501
|
|
121
|
+
:rtype: str
|
|
122
|
+
"""
|
|
123
|
+
return self._name
|
|
124
|
+
|
|
125
|
+
@name.setter
|
|
126
|
+
def name(self, name: 'str'):
|
|
127
|
+
"""Sets the name of this V1ReservationDetails.
|
|
128
|
+
|
|
129
|
+
|
|
130
|
+
:param name: The name of this V1ReservationDetails. # noqa: E501
|
|
131
|
+
:type: str
|
|
132
|
+
"""
|
|
133
|
+
|
|
134
|
+
self._name = name
|
|
135
|
+
|
|
136
|
+
@property
|
|
137
|
+
def start_time(self) -> 'datetime':
|
|
138
|
+
"""Gets the start_time of this V1ReservationDetails. # noqa: E501
|
|
139
|
+
|
|
140
|
+
|
|
141
|
+
:return: The start_time of this V1ReservationDetails. # noqa: E501
|
|
142
|
+
:rtype: datetime
|
|
143
|
+
"""
|
|
144
|
+
return self._start_time
|
|
145
|
+
|
|
146
|
+
@start_time.setter
|
|
147
|
+
def start_time(self, start_time: 'datetime'):
|
|
148
|
+
"""Sets the start_time of this V1ReservationDetails.
|
|
149
|
+
|
|
150
|
+
|
|
151
|
+
:param start_time: The start_time of this V1ReservationDetails. # noqa: E501
|
|
152
|
+
:type: datetime
|
|
153
|
+
"""
|
|
154
|
+
|
|
155
|
+
self._start_time = start_time
|
|
156
|
+
|
|
157
|
+
def to_dict(self) -> dict:
|
|
158
|
+
"""Returns the model properties as a dict"""
|
|
159
|
+
result = {}
|
|
160
|
+
|
|
161
|
+
for attr, _ in six.iteritems(self.swagger_types):
|
|
162
|
+
value = getattr(self, attr)
|
|
163
|
+
if isinstance(value, list):
|
|
164
|
+
result[attr] = list(map(
|
|
165
|
+
lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
|
|
166
|
+
value
|
|
167
|
+
))
|
|
168
|
+
elif hasattr(value, "to_dict"):
|
|
169
|
+
result[attr] = value.to_dict()
|
|
170
|
+
elif isinstance(value, dict):
|
|
171
|
+
result[attr] = dict(map(
|
|
172
|
+
lambda item: (item[0], item[1].to_dict())
|
|
173
|
+
if hasattr(item[1], "to_dict") else item,
|
|
174
|
+
value.items()
|
|
175
|
+
))
|
|
176
|
+
else:
|
|
177
|
+
result[attr] = value
|
|
178
|
+
if issubclass(V1ReservationDetails, dict):
|
|
179
|
+
for key, value in self.items():
|
|
180
|
+
result[key] = value
|
|
181
|
+
|
|
182
|
+
return result
|
|
183
|
+
|
|
184
|
+
def to_str(self) -> str:
|
|
185
|
+
"""Returns the string representation of the model"""
|
|
186
|
+
return pprint.pformat(self.to_dict())
|
|
187
|
+
|
|
188
|
+
def __repr__(self) -> str:
|
|
189
|
+
"""For `print` and `pprint`"""
|
|
190
|
+
return self.to_str()
|
|
191
|
+
|
|
192
|
+
def __eq__(self, other: 'V1ReservationDetails') -> bool:
|
|
193
|
+
"""Returns true if both objects are equal"""
|
|
194
|
+
if not isinstance(other, V1ReservationDetails):
|
|
195
|
+
return False
|
|
196
|
+
|
|
197
|
+
return self.__dict__ == other.__dict__
|
|
198
|
+
|
|
199
|
+
def __ne__(self, other: 'V1ReservationDetails') -> bool:
|
|
200
|
+
"""Returns true if both objects are not equal"""
|
|
201
|
+
return not self == other
|