lightning-sdk 0.2.20__py3-none-any.whl → 0.2.21rc1__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 (29) hide show
  1. lightning_sdk/__init__.py +1 -1
  2. lightning_sdk/api/deployment_api.py +7 -2
  3. lightning_sdk/api/license_api.py +3 -3
  4. lightning_sdk/api/llm_api.py +53 -1
  5. lightning_sdk/api/studio_api.py +5 -0
  6. lightning_sdk/deployment/deployment.py +17 -3
  7. lightning_sdk/lightning_cloud/openapi/__init__.py +0 -1
  8. lightning_sdk/lightning_cloud/openapi/api/endpoint_service_api.py +11 -1
  9. lightning_sdk/lightning_cloud/openapi/api/user_service_api.py +0 -85
  10. lightning_sdk/lightning_cloud/openapi/models/__init__.py +0 -1
  11. lightning_sdk/lightning_cloud/openapi/models/update.py +79 -1
  12. lightning_sdk/lightning_cloud/openapi/models/v1_cloud_space_environment_template.py +53 -1
  13. lightning_sdk/lightning_cloud/openapi/models/v1_cloud_space_environment_template_config.py +27 -1
  14. lightning_sdk/lightning_cloud/openapi/models/v1_cluster_deletion_options.py +27 -1
  15. lightning_sdk/lightning_cloud/openapi/models/v1_create_cloud_space_environment_template_request.py +79 -1
  16. lightning_sdk/lightning_cloud/openapi/models/v1_create_project_request.py +79 -1
  17. lightning_sdk/lightning_cloud/openapi/models/v1_message.py +53 -1
  18. lightning_sdk/lightning_cloud/openapi/models/v1_routing_telemetry.py +27 -1
  19. lightning_sdk/lightning_cloud/openapi/models/v1_user_features.py +27 -287
  20. lightning_sdk/llm/llm.py +47 -1
  21. lightning_sdk/pipeline/pipeline.py +1 -1
  22. lightning_sdk/services/utilities.py +15 -1
  23. {lightning_sdk-0.2.20.dist-info → lightning_sdk-0.2.21rc1.dist-info}/METADATA +1 -1
  24. {lightning_sdk-0.2.20.dist-info → lightning_sdk-0.2.21rc1.dist-info}/RECORD +28 -29
  25. lightning_sdk/lightning_cloud/openapi/models/v1_get_user_storage_response.py +0 -201
  26. {lightning_sdk-0.2.20.dist-info → lightning_sdk-0.2.21rc1.dist-info}/LICENSE +0 -0
  27. {lightning_sdk-0.2.20.dist-info → lightning_sdk-0.2.21rc1.dist-info}/WHEEL +0 -0
  28. {lightning_sdk-0.2.20.dist-info → lightning_sdk-0.2.21rc1.dist-info}/entry_points.txt +0 -0
  29. {lightning_sdk-0.2.20.dist-info → lightning_sdk-0.2.21rc1.dist-info}/top_level.txt +0 -0
lightning_sdk/__init__.py CHANGED
@@ -31,6 +31,6 @@ __all__ = [
31
31
  "User",
32
32
  ]
33
33
 
34
- __version__ = "0.2.20"
34
+ __version__ = "0.2.21.rc1"
35
35
  _check_version_and_prompt_upgrade(__version__)
36
36
  _set_tqdm_envvars_noninteractive()
@@ -282,10 +282,11 @@ class DeploymentApi:
282
282
 
283
283
  requires_release = False
284
284
  requires_release |= apply_change(deployment.spec, "image", image)
285
+
285
286
  requires_release |= apply_change(deployment.spec, "entrypoint", entrypoint)
286
287
  requires_release |= apply_change(deployment.spec, "command", command)
287
288
  requires_release |= apply_change(deployment.spec, "env", to_env(env))
288
- requires_release |= apply_change(deployment.spec, "readiness_probe", to_health_check(health_check))
289
+ requires_release |= apply_change(deployment.spec, "readiness_probe", to_health_check(health_check, False))
289
290
  requires_release |= apply_change(deployment.spec, "cluster_id", cloud_account)
290
291
  requires_release |= apply_change(deployment.spec, "spot", spot)
291
292
  requires_release |= apply_change(deployment.spec, "quantity", quantity)
@@ -524,8 +525,12 @@ def to_endpoint(
524
525
 
525
526
 
526
527
  def to_health_check(
527
- health_check: Optional[Union[HttpHealthCheck, ExecHealthCheck]] = None
528
+ health_check: Optional[Union[HttpHealthCheck, ExecHealthCheck]] = None,
529
+ use_default: bool = True,
528
530
  ) -> Optional[V1JobHealthCheckConfig]:
531
+ if health_check is None and not use_default:
532
+ return None
533
+
529
534
  # Use Default health check if none is provided
530
535
  if not health_check:
531
536
  return V1JobHealthCheckConfig(
@@ -5,13 +5,13 @@ from urllib.parse import urlencode
5
5
  from lightning_sdk.lightning_cloud import env
6
6
  from lightning_sdk.lightning_cloud.rest_client import LightningClient
7
7
 
8
- LICENSE_CODE = os.environ.get("LICENSE_CODE", "we843fiji89")
8
+ LICENSE_CODE = os.environ.get("LICENSE_CODE", "d9s79g79ss")
9
9
  # https://lightning.ai/home?settings=licenses
10
- LICENSE_SIGNING_URL = f"{env.LIGHTNING_CLOUD_URL}/ai-hub?settings=licenses"
10
+ LICENSE_SIGNING_URL = f"{env.LIGHTNING_CLOUD_URL}?settings=licenses"
11
11
 
12
12
 
13
13
  def generate_url_user_settings(redirect_to: str = LICENSE_SIGNING_URL) -> str:
14
- params = urlencode({"redirectTo": redirect_to, "mode": "licenses", "okbhrt": LICENSE_CODE})
14
+ params = urlencode({"redirectTo": redirect_to, "okbhrt": LICENSE_CODE})
15
15
  return f"{env.LIGHTNING_CLOUD_URL}/sign-in?{params}"
16
16
 
17
17
 
@@ -1,7 +1,8 @@
1
+ import asyncio
1
2
  import base64
2
3
  import json
3
4
  import os
4
- from typing import Dict, Generator, List, Optional, Union
5
+ from typing import AsyncGenerator, Dict, Generator, List, Optional, Union
5
6
 
6
7
  from pip._vendor.urllib3 import HTTPResponse
7
8
 
@@ -110,6 +111,57 @@ class LLMApi:
110
111
  return result.result
111
112
  return self._stream_chat_response(result)
112
113
 
114
+ async def async_start_conversation(
115
+ self,
116
+ prompt: str,
117
+ system_prompt: Optional[str],
118
+ max_completion_tokens: int,
119
+ assistant_id: str,
120
+ images: Optional[List[str]] = None,
121
+ conversation_id: Optional[str] = None,
122
+ billing_project_id: Optional[str] = None,
123
+ name: Optional[str] = None,
124
+ metadata: Optional[Dict[str, str]] = None,
125
+ stream: bool = False,
126
+ ) -> Union[V1ConversationResponseChunk, AsyncGenerator[V1ConversationResponseChunk, None]]:
127
+ is_internal_conversation = os.getenv("LIGHTNING_INTERNAL_CONVERSATION", "false").lower() == "true"
128
+ body = {
129
+ "message": {
130
+ "author": {"role": "user"},
131
+ "content": [
132
+ {"contentType": "text", "parts": [prompt]},
133
+ ],
134
+ },
135
+ "max_completion_tokens": max_completion_tokens,
136
+ "conversation_id": conversation_id,
137
+ "billing_project_id": billing_project_id,
138
+ "name": name,
139
+ "stream": stream,
140
+ "metadata": metadata or {},
141
+ "internal_conversation": is_internal_conversation,
142
+ }
143
+ if images:
144
+ for image in images:
145
+ url = image
146
+ if not image.startswith("http"):
147
+ url = self._encode_image_bytes_to_data_url(image)
148
+
149
+ body["message"]["content"].append(
150
+ {
151
+ "contentType": "image",
152
+ "parts": [url],
153
+ }
154
+ )
155
+
156
+ if not stream:
157
+ thread = await asyncio.to_thread(
158
+ self._client.assistants_service_start_conversation, body, assistant_id, async_req=True
159
+ )
160
+ result = await asyncio.to_thread(thread.get)
161
+ return result.result
162
+
163
+ raise NotImplementedError("Streaming is not supported in this client.")
164
+
113
165
  def list_conversations(self, assistant_id: str) -> List[str]:
114
166
  result = self._client.assistants_service_list_conversations(assistant_id)
115
167
  return result.conversations
@@ -154,6 +154,11 @@ class StudioApi:
154
154
  @backoff.on_exception(backoff.expo, AttributeError, max_tries=10)
155
155
  def _check_code_status_top_up_restore_finished(self, studio_id: str, teamspace_id: str) -> bool:
156
156
  """Retries checking the top_up_restore_finished value of the code status when there's an AttributeError."""
157
+ if (
158
+ self.get_studio_status(studio_id, teamspace_id) is None
159
+ or self.get_studio_status(studio_id, teamspace_id).in_use is None
160
+ ):
161
+ return False
157
162
  startup_status = self.get_studio_status(studio_id, teamspace_id).in_use.startup_status
158
163
  return startup_status and startup_status.top_up_restore_finished
159
164
 
@@ -276,8 +276,8 @@ class Deployment:
276
276
  cloud_account=cloud_account,
277
277
  machine=machine,
278
278
  image=image,
279
- entrypoint=entrypoint or "",
280
- command=command or "",
279
+ entrypoint=entrypoint,
280
+ command=command,
281
281
  ports=ports,
282
282
  custom_domain=custom_domain,
283
283
  auth=auth,
@@ -340,7 +340,7 @@ class Deployment:
340
340
  return None
341
341
 
342
342
  @property
343
- def readiness_probe(self) -> Optional[Union[HttpHealthCheck, ExecHealthCheck]]:
343
+ def health_check(self) -> Optional[Union[HttpHealthCheck, ExecHealthCheck]]:
344
344
  """The health check to validate the replicas are ready to receive traffic."""
345
345
  if self._deployment:
346
346
  self._deployment = self._deployment_api.get_deployment_by_name(self._name, self._teamspace.id)
@@ -467,6 +467,20 @@ class Deployment:
467
467
  return self._deployment.spec.image
468
468
  return None
469
469
 
470
+ @property
471
+ def entrypoint(self) -> Optional[str]:
472
+ if self._deployment:
473
+ self._deployment = self._deployment_api.get_deployment_by_name(self._name, self._teamspace.id)
474
+ return self._deployment.spec.entrypoint
475
+ return None
476
+
477
+ @property
478
+ def command(self) -> Optional[str]:
479
+ if self._deployment:
480
+ self._deployment = self._deployment_api.get_deployment_by_name(self._name, self._teamspace.id)
481
+ return self._deployment.spec.command
482
+ return None
483
+
470
484
  @property
471
485
  def _session(self) -> Any:
472
486
  if self._request_session is None:
@@ -563,7 +563,6 @@ from lightning_sdk.lightning_cloud.openapi.models.v1_get_user_balance_response i
563
563
  from lightning_sdk.lightning_cloud.openapi.models.v1_get_user_notification_preferences_response import V1GetUserNotificationPreferencesResponse
564
564
  from lightning_sdk.lightning_cloud.openapi.models.v1_get_user_response import V1GetUserResponse
565
565
  from lightning_sdk.lightning_cloud.openapi.models.v1_get_user_storage_breakdown_response import V1GetUserStorageBreakdownResponse
566
- from lightning_sdk.lightning_cloud.openapi.models.v1_get_user_storage_response import V1GetUserStorageResponse
567
566
  from lightning_sdk.lightning_cloud.openapi.models.v1_git_credentials import V1GitCredentials
568
567
  from lightning_sdk.lightning_cloud.openapi.models.v1_google_cloud_direct_v1 import V1GoogleCloudDirectV1
569
568
  from lightning_sdk.lightning_cloud.openapi.models.v1_google_cloud_direct_v1_status import V1GoogleCloudDirectV1Status
@@ -1420,6 +1420,8 @@ class EndpointServiceApi(object):
1420
1420
  :param list[str] ids:
1421
1421
  :param bool active_cloudspaces:
1422
1422
  :param bool active_jobs:
1423
+ :param list[str] cloudspace_ids:
1424
+ :param list[str] job_ids:
1423
1425
  :return: V1ListEndpointsResponse
1424
1426
  If the method is called asynchronously,
1425
1427
  returns the request thread.
@@ -1447,12 +1449,14 @@ class EndpointServiceApi(object):
1447
1449
  :param list[str] ids:
1448
1450
  :param bool active_cloudspaces:
1449
1451
  :param bool active_jobs:
1452
+ :param list[str] cloudspace_ids:
1453
+ :param list[str] job_ids:
1450
1454
  :return: V1ListEndpointsResponse
1451
1455
  If the method is called asynchronously,
1452
1456
  returns the request thread.
1453
1457
  """
1454
1458
 
1455
- all_params = ['project_id', 'cloudspace_id', 'auto_start', 'cluster_id', 'ids', 'active_cloudspaces', 'active_jobs'] # noqa: E501
1459
+ all_params = ['project_id', 'cloudspace_id', 'auto_start', 'cluster_id', 'ids', 'active_cloudspaces', 'active_jobs', 'cloudspace_ids', 'job_ids'] # noqa: E501
1456
1460
  all_params.append('async_req')
1457
1461
  all_params.append('_return_http_data_only')
1458
1462
  all_params.append('_preload_content')
@@ -1492,6 +1496,12 @@ class EndpointServiceApi(object):
1492
1496
  query_params.append(('activeCloudspaces', params['active_cloudspaces'])) # noqa: E501
1493
1497
  if 'active_jobs' in params:
1494
1498
  query_params.append(('activeJobs', params['active_jobs'])) # noqa: E501
1499
+ if 'cloudspace_ids' in params:
1500
+ query_params.append(('cloudspaceIds', params['cloudspace_ids'])) # noqa: E501
1501
+ collection_formats['cloudspaceIds'] = 'multi' # noqa: E501
1502
+ if 'job_ids' in params:
1503
+ query_params.append(('jobIds', params['job_ids'])) # noqa: E501
1504
+ collection_formats['jobIds'] = 'multi' # noqa: E501
1495
1505
 
1496
1506
  header_params = {}
1497
1507
 
@@ -706,91 +706,6 @@ class UserServiceApi(object):
706
706
  _request_timeout=params.get('_request_timeout'),
707
707
  collection_formats=collection_formats)
708
708
 
709
- def user_service_get_user_storage(self, **kwargs) -> 'V1GetUserStorageResponse': # noqa: E501
710
- """user_service_get_user_storage # noqa: E501
711
-
712
- This method makes a synchronous HTTP request by default. To make an
713
- asynchronous HTTP request, please pass async_req=True
714
- >>> thread = api.user_service_get_user_storage(async_req=True)
715
- >>> result = thread.get()
716
-
717
- :param async_req bool
718
- :return: V1GetUserStorageResponse
719
- If the method is called asynchronously,
720
- returns the request thread.
721
- """
722
- kwargs['_return_http_data_only'] = True
723
- if kwargs.get('async_req'):
724
- return self.user_service_get_user_storage_with_http_info(**kwargs) # noqa: E501
725
- else:
726
- (data) = self.user_service_get_user_storage_with_http_info(**kwargs) # noqa: E501
727
- return data
728
-
729
- def user_service_get_user_storage_with_http_info(self, **kwargs) -> 'V1GetUserStorageResponse': # noqa: E501
730
- """user_service_get_user_storage # noqa: E501
731
-
732
- This method makes a synchronous HTTP request by default. To make an
733
- asynchronous HTTP request, please pass async_req=True
734
- >>> thread = api.user_service_get_user_storage_with_http_info(async_req=True)
735
- >>> result = thread.get()
736
-
737
- :param async_req bool
738
- :return: V1GetUserStorageResponse
739
- If the method is called asynchronously,
740
- returns the request thread.
741
- """
742
-
743
- all_params = [] # noqa: E501
744
- all_params.append('async_req')
745
- all_params.append('_return_http_data_only')
746
- all_params.append('_preload_content')
747
- all_params.append('_request_timeout')
748
-
749
- params = locals()
750
- for key, val in six.iteritems(params['kwargs']):
751
- if key not in all_params:
752
- raise TypeError(
753
- "Got an unexpected keyword argument '%s'"
754
- " to method user_service_get_user_storage" % key
755
- )
756
- params[key] = val
757
- del params['kwargs']
758
-
759
- collection_formats = {}
760
-
761
- path_params = {}
762
-
763
- query_params = []
764
-
765
- header_params = {}
766
-
767
- form_params = []
768
- local_var_files = {}
769
-
770
- body_params = None
771
- # HTTP header `Accept`
772
- header_params['Accept'] = self.api_client.select_header_accept(
773
- ['application/json']) # noqa: E501
774
-
775
- # Authentication setting
776
- auth_settings = [] # noqa: E501
777
-
778
- return self.api_client.call_api(
779
- '/v1/users/storage', 'GET',
780
- path_params,
781
- query_params,
782
- header_params,
783
- body=body_params,
784
- post_params=form_params,
785
- files=local_var_files,
786
- response_type='V1GetUserStorageResponse', # noqa: E501
787
- auth_settings=auth_settings,
788
- async_req=params.get('async_req'),
789
- _return_http_data_only=params.get('_return_http_data_only'),
790
- _preload_content=params.get('_preload_content', True),
791
- _request_timeout=params.get('_request_timeout'),
792
- collection_formats=collection_formats)
793
-
794
709
  def user_service_get_user_storage_breakdown(self, **kwargs) -> 'V1GetUserStorageBreakdownResponse': # noqa: E501
795
710
  """user_service_get_user_storage_breakdown # noqa: E501
796
711
 
@@ -518,7 +518,6 @@ from lightning_sdk.lightning_cloud.openapi.models.v1_get_user_balance_response i
518
518
  from lightning_sdk.lightning_cloud.openapi.models.v1_get_user_notification_preferences_response import V1GetUserNotificationPreferencesResponse
519
519
  from lightning_sdk.lightning_cloud.openapi.models.v1_get_user_response import V1GetUserResponse
520
520
  from lightning_sdk.lightning_cloud.openapi.models.v1_get_user_storage_breakdown_response import V1GetUserStorageBreakdownResponse
521
- from lightning_sdk.lightning_cloud.openapi.models.v1_get_user_storage_response import V1GetUserStorageResponse
522
521
  from lightning_sdk.lightning_cloud.openapi.models.v1_git_credentials import V1GitCredentials
523
522
  from lightning_sdk.lightning_cloud.openapi.models.v1_google_cloud_direct_v1 import V1GoogleCloudDirectV1
524
523
  from lightning_sdk.lightning_cloud.openapi.models.v1_google_cloud_direct_v1_status import V1GoogleCloudDirectV1Status
@@ -43,8 +43,11 @@ class Update(object):
43
43
  swagger_types = {
44
44
  'allowed_machines': 'list[str]',
45
45
  'default_machine': 'str',
46
+ 'description': 'str',
46
47
  'disabled': 'bool',
47
48
  'environment_type': 'V1CloudSpaceEnvironmentType',
49
+ 'icon': 'str',
50
+ 'initial_setup_script_text': 'str',
48
51
  'machine_image_version': 'str',
49
52
  'name': 'str',
50
53
  'org_id': 'str',
@@ -55,8 +58,11 @@ class Update(object):
55
58
  attribute_map = {
56
59
  'allowed_machines': 'allowedMachines',
57
60
  'default_machine': 'defaultMachine',
61
+ 'description': 'description',
58
62
  'disabled': 'disabled',
59
63
  'environment_type': 'environmentType',
64
+ 'icon': 'icon',
65
+ 'initial_setup_script_text': 'initialSetupScriptText',
60
66
  'machine_image_version': 'machineImageVersion',
61
67
  'name': 'name',
62
68
  'org_id': 'orgId',
@@ -64,12 +70,15 @@ class Update(object):
64
70
  'setup_script_text': 'setupScriptText'
65
71
  }
66
72
 
67
- def __init__(self, allowed_machines: 'list[str]' =None, default_machine: 'str' =None, disabled: 'bool' =None, environment_type: 'V1CloudSpaceEnvironmentType' =None, machine_image_version: 'str' =None, name: 'str' =None, org_id: 'str' =None, plugins: 'list[str]' =None, setup_script_text: 'str' =None): # noqa: E501
73
+ def __init__(self, allowed_machines: 'list[str]' =None, default_machine: 'str' =None, description: 'str' =None, disabled: 'bool' =None, environment_type: 'V1CloudSpaceEnvironmentType' =None, icon: 'str' =None, initial_setup_script_text: 'str' =None, machine_image_version: 'str' =None, name: 'str' =None, org_id: 'str' =None, plugins: 'list[str]' =None, setup_script_text: 'str' =None): # noqa: E501
68
74
  """Update - a model defined in Swagger""" # noqa: E501
69
75
  self._allowed_machines = None
70
76
  self._default_machine = None
77
+ self._description = None
71
78
  self._disabled = None
72
79
  self._environment_type = None
80
+ self._icon = None
81
+ self._initial_setup_script_text = None
73
82
  self._machine_image_version = None
74
83
  self._name = None
75
84
  self._org_id = None
@@ -80,10 +89,16 @@ class Update(object):
80
89
  self.allowed_machines = allowed_machines
81
90
  if default_machine is not None:
82
91
  self.default_machine = default_machine
92
+ if description is not None:
93
+ self.description = description
83
94
  if disabled is not None:
84
95
  self.disabled = disabled
85
96
  if environment_type is not None:
86
97
  self.environment_type = environment_type
98
+ if icon is not None:
99
+ self.icon = icon
100
+ if initial_setup_script_text is not None:
101
+ self.initial_setup_script_text = initial_setup_script_text
87
102
  if machine_image_version is not None:
88
103
  self.machine_image_version = machine_image_version
89
104
  if name is not None:
@@ -137,6 +152,27 @@ class Update(object):
137
152
 
138
153
  self._default_machine = default_machine
139
154
 
155
+ @property
156
+ def description(self) -> 'str':
157
+ """Gets the description of this Update. # noqa: E501
158
+
159
+
160
+ :return: The description of this Update. # noqa: E501
161
+ :rtype: str
162
+ """
163
+ return self._description
164
+
165
+ @description.setter
166
+ def description(self, description: 'str'):
167
+ """Sets the description of this Update.
168
+
169
+
170
+ :param description: The description of this Update. # noqa: E501
171
+ :type: str
172
+ """
173
+
174
+ self._description = description
175
+
140
176
  @property
141
177
  def disabled(self) -> 'bool':
142
178
  """Gets the disabled of this Update. # noqa: E501
@@ -179,6 +215,48 @@ class Update(object):
179
215
 
180
216
  self._environment_type = environment_type
181
217
 
218
+ @property
219
+ def icon(self) -> 'str':
220
+ """Gets the icon of this Update. # noqa: E501
221
+
222
+
223
+ :return: The icon of this Update. # noqa: E501
224
+ :rtype: str
225
+ """
226
+ return self._icon
227
+
228
+ @icon.setter
229
+ def icon(self, icon: 'str'):
230
+ """Sets the icon of this Update.
231
+
232
+
233
+ :param icon: The icon of this Update. # noqa: E501
234
+ :type: str
235
+ """
236
+
237
+ self._icon = icon
238
+
239
+ @property
240
+ def initial_setup_script_text(self) -> 'str':
241
+ """Gets the initial_setup_script_text of this Update. # noqa: E501
242
+
243
+
244
+ :return: The initial_setup_script_text of this Update. # noqa: E501
245
+ :rtype: str
246
+ """
247
+ return self._initial_setup_script_text
248
+
249
+ @initial_setup_script_text.setter
250
+ def initial_setup_script_text(self, initial_setup_script_text: 'str'):
251
+ """Sets the initial_setup_script_text of this Update.
252
+
253
+
254
+ :param initial_setup_script_text: The initial_setup_script_text of this Update. # noqa: E501
255
+ :type: str
256
+ """
257
+
258
+ self._initial_setup_script_text = initial_setup_script_text
259
+
182
260
  @property
183
261
  def machine_image_version(self) -> 'str':
184
262
  """Gets the machine_image_version of this Update. # noqa: E501
@@ -43,7 +43,9 @@ class V1CloudSpaceEnvironmentTemplate(object):
43
43
  swagger_types = {
44
44
  'config': 'V1CloudSpaceEnvironmentTemplateConfig',
45
45
  'created_at': 'datetime',
46
+ 'description': 'str',
46
47
  'disabled': 'bool',
48
+ 'icon': 'str',
47
49
  'id': 'str',
48
50
  'managed': 'bool',
49
51
  'managed_id': 'str',
@@ -56,7 +58,9 @@ class V1CloudSpaceEnvironmentTemplate(object):
56
58
  attribute_map = {
57
59
  'config': 'config',
58
60
  'created_at': 'createdAt',
61
+ 'description': 'description',
59
62
  'disabled': 'disabled',
63
+ 'icon': 'icon',
60
64
  'id': 'id',
61
65
  'managed': 'managed',
62
66
  'managed_id': 'managedId',
@@ -66,11 +70,13 @@ class V1CloudSpaceEnvironmentTemplate(object):
66
70
  'user_id': 'userId'
67
71
  }
68
72
 
69
- def __init__(self, config: 'V1CloudSpaceEnvironmentTemplateConfig' =None, created_at: 'datetime' =None, disabled: 'bool' =None, id: 'str' =None, managed: 'bool' =None, managed_id: 'str' =None, name: 'str' =None, org_id: 'str' =None, updated_at: 'datetime' =None, user_id: 'str' =None): # noqa: E501
73
+ def __init__(self, config: 'V1CloudSpaceEnvironmentTemplateConfig' =None, created_at: 'datetime' =None, description: 'str' =None, disabled: 'bool' =None, icon: 'str' =None, id: 'str' =None, managed: 'bool' =None, managed_id: 'str' =None, name: 'str' =None, org_id: 'str' =None, updated_at: 'datetime' =None, user_id: 'str' =None): # noqa: E501
70
74
  """V1CloudSpaceEnvironmentTemplate - a model defined in Swagger""" # noqa: E501
71
75
  self._config = None
72
76
  self._created_at = None
77
+ self._description = None
73
78
  self._disabled = None
79
+ self._icon = None
74
80
  self._id = None
75
81
  self._managed = None
76
82
  self._managed_id = None
@@ -83,8 +89,12 @@ class V1CloudSpaceEnvironmentTemplate(object):
83
89
  self.config = config
84
90
  if created_at is not None:
85
91
  self.created_at = created_at
92
+ if description is not None:
93
+ self.description = description
86
94
  if disabled is not None:
87
95
  self.disabled = disabled
96
+ if icon is not None:
97
+ self.icon = icon
88
98
  if id is not None:
89
99
  self.id = id
90
100
  if managed is not None:
@@ -142,6 +152,27 @@ class V1CloudSpaceEnvironmentTemplate(object):
142
152
 
143
153
  self._created_at = created_at
144
154
 
155
+ @property
156
+ def description(self) -> 'str':
157
+ """Gets the description of this V1CloudSpaceEnvironmentTemplate. # noqa: E501
158
+
159
+
160
+ :return: The description of this V1CloudSpaceEnvironmentTemplate. # noqa: E501
161
+ :rtype: str
162
+ """
163
+ return self._description
164
+
165
+ @description.setter
166
+ def description(self, description: 'str'):
167
+ """Sets the description of this V1CloudSpaceEnvironmentTemplate.
168
+
169
+
170
+ :param description: The description of this V1CloudSpaceEnvironmentTemplate. # noqa: E501
171
+ :type: str
172
+ """
173
+
174
+ self._description = description
175
+
145
176
  @property
146
177
  def disabled(self) -> 'bool':
147
178
  """Gets the disabled of this V1CloudSpaceEnvironmentTemplate. # noqa: E501
@@ -163,6 +194,27 @@ class V1CloudSpaceEnvironmentTemplate(object):
163
194
 
164
195
  self._disabled = disabled
165
196
 
197
+ @property
198
+ def icon(self) -> 'str':
199
+ """Gets the icon of this V1CloudSpaceEnvironmentTemplate. # noqa: E501
200
+
201
+
202
+ :return: The icon of this V1CloudSpaceEnvironmentTemplate. # noqa: E501
203
+ :rtype: str
204
+ """
205
+ return self._icon
206
+
207
+ @icon.setter
208
+ def icon(self, icon: 'str'):
209
+ """Sets the icon of this V1CloudSpaceEnvironmentTemplate.
210
+
211
+
212
+ :param icon: The icon of this V1CloudSpaceEnvironmentTemplate. # noqa: E501
213
+ :type: str
214
+ """
215
+
216
+ self._icon = icon
217
+
166
218
  @property
167
219
  def id(self) -> 'str':
168
220
  """Gets the id of this V1CloudSpaceEnvironmentTemplate. # noqa: E501
@@ -44,6 +44,7 @@ class V1CloudSpaceEnvironmentTemplateConfig(object):
44
44
  'allowed_machines': 'list[str]',
45
45
  'default_machine': 'str',
46
46
  'environment_type': 'V1CloudSpaceEnvironmentType',
47
+ 'initial_setup_script_text': 'str',
47
48
  'machine_image_version': 'str',
48
49
  'plugins': 'list[str]',
49
50
  'setup_script_text': 'str'
@@ -53,16 +54,18 @@ class V1CloudSpaceEnvironmentTemplateConfig(object):
53
54
  'allowed_machines': 'allowedMachines',
54
55
  'default_machine': 'defaultMachine',
55
56
  'environment_type': 'environmentType',
57
+ 'initial_setup_script_text': 'initialSetupScriptText',
56
58
  'machine_image_version': 'machineImageVersion',
57
59
  'plugins': 'plugins',
58
60
  'setup_script_text': 'setupScriptText'
59
61
  }
60
62
 
61
- def __init__(self, allowed_machines: 'list[str]' =None, default_machine: 'str' =None, environment_type: 'V1CloudSpaceEnvironmentType' =None, machine_image_version: 'str' =None, plugins: 'list[str]' =None, setup_script_text: 'str' =None): # noqa: E501
63
+ def __init__(self, allowed_machines: 'list[str]' =None, default_machine: 'str' =None, environment_type: 'V1CloudSpaceEnvironmentType' =None, initial_setup_script_text: 'str' =None, machine_image_version: 'str' =None, plugins: 'list[str]' =None, setup_script_text: 'str' =None): # noqa: E501
62
64
  """V1CloudSpaceEnvironmentTemplateConfig - a model defined in Swagger""" # noqa: E501
63
65
  self._allowed_machines = None
64
66
  self._default_machine = None
65
67
  self._environment_type = None
68
+ self._initial_setup_script_text = None
66
69
  self._machine_image_version = None
67
70
  self._plugins = None
68
71
  self._setup_script_text = None
@@ -73,6 +76,8 @@ class V1CloudSpaceEnvironmentTemplateConfig(object):
73
76
  self.default_machine = default_machine
74
77
  if environment_type is not None:
75
78
  self.environment_type = environment_type
79
+ if initial_setup_script_text is not None:
80
+ self.initial_setup_script_text = initial_setup_script_text
76
81
  if machine_image_version is not None:
77
82
  self.machine_image_version = machine_image_version
78
83
  if plugins is not None:
@@ -143,6 +148,27 @@ class V1CloudSpaceEnvironmentTemplateConfig(object):
143
148
 
144
149
  self._environment_type = environment_type
145
150
 
151
+ @property
152
+ def initial_setup_script_text(self) -> 'str':
153
+ """Gets the initial_setup_script_text of this V1CloudSpaceEnvironmentTemplateConfig. # noqa: E501
154
+
155
+
156
+ :return: The initial_setup_script_text of this V1CloudSpaceEnvironmentTemplateConfig. # noqa: E501
157
+ :rtype: str
158
+ """
159
+ return self._initial_setup_script_text
160
+
161
+ @initial_setup_script_text.setter
162
+ def initial_setup_script_text(self, initial_setup_script_text: 'str'):
163
+ """Sets the initial_setup_script_text of this V1CloudSpaceEnvironmentTemplateConfig.
164
+
165
+
166
+ :param initial_setup_script_text: The initial_setup_script_text of this V1CloudSpaceEnvironmentTemplateConfig. # noqa: E501
167
+ :type: str
168
+ """
169
+
170
+ self._initial_setup_script_text = initial_setup_script_text
171
+
146
172
  @property
147
173
  def machine_image_version(self) -> 'str':
148
174
  """Gets the machine_image_version of this V1CloudSpaceEnvironmentTemplateConfig. # noqa: E501