lightning-sdk 0.1.33__py3-none-any.whl → 0.1.35__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 (34) hide show
  1. lightning_sdk/__init__.py +1 -1
  2. lightning_sdk/ai_hub.py +61 -3
  3. lightning_sdk/api/ai_hub_api.py +14 -0
  4. lightning_sdk/cli/ai_hub.py +49 -0
  5. lightning_sdk/cli/download.py +3 -3
  6. lightning_sdk/cli/entrypoint.py +2 -0
  7. lightning_sdk/lightning_cloud/login.py +5 -2
  8. lightning_sdk/lightning_cloud/openapi/__init__.py +1 -0
  9. lightning_sdk/lightning_cloud/openapi/api/cloud_space_service_api.py +5 -1
  10. lightning_sdk/lightning_cloud/openapi/models/__init__.py +1 -0
  11. lightning_sdk/lightning_cloud/openapi/models/create_deployment_request_defines_a_spec_for_the_job_that_allows_for_autoscaling_jobs.py +27 -1
  12. lightning_sdk/lightning_cloud/openapi/models/deployments_id_body.py +27 -1
  13. lightning_sdk/lightning_cloud/openapi/models/snowflake_export_body.py +27 -1
  14. lightning_sdk/lightning_cloud/openapi/models/v1_capacity_block_offering.py +27 -1
  15. lightning_sdk/lightning_cloud/openapi/models/v1_checkbox.py +175 -0
  16. lightning_sdk/lightning_cloud/openapi/models/v1_cloud_space_version.py +53 -1
  17. lightning_sdk/lightning_cloud/openapi/models/v1_cluster_accelerator.py +27 -1
  18. lightning_sdk/lightning_cloud/openapi/models/v1_deployment.py +27 -1
  19. lightning_sdk/lightning_cloud/openapi/models/v1_deployment_template_parameter.py +27 -1
  20. lightning_sdk/lightning_cloud/openapi/models/v1_deployment_template_parameter_type.py +1 -0
  21. lightning_sdk/lightning_cloud/openapi/models/v1_get_user_response.py +27 -1
  22. lightning_sdk/lightning_cloud/openapi/models/v1_google_cloud_direct_v1.py +27 -1
  23. lightning_sdk/lightning_cloud/openapi/models/v1_job_spec.py +1 -27
  24. lightning_sdk/lightning_cloud/openapi/models/v1_lightningwork_status.py +1 -27
  25. lightning_sdk/lightning_cloud/openapi/models/v1_metric_value.py +27 -1
  26. lightning_sdk/lightning_cloud/openapi/models/v1_snowflake_data_connection.py +27 -1
  27. lightning_sdk/lightning_cloud/openapi/models/v1_usage_details.py +55 -3
  28. lightning_sdk/lightning_cloud/openapi/models/v1_user_features.py +53 -1
  29. {lightning_sdk-0.1.33.dist-info → lightning_sdk-0.1.35.dist-info}/METADATA +1 -1
  30. {lightning_sdk-0.1.33.dist-info → lightning_sdk-0.1.35.dist-info}/RECORD +34 -32
  31. {lightning_sdk-0.1.33.dist-info → lightning_sdk-0.1.35.dist-info}/LICENSE +0 -0
  32. {lightning_sdk-0.1.33.dist-info → lightning_sdk-0.1.35.dist-info}/WHEEL +0 -0
  33. {lightning_sdk-0.1.33.dist-info → lightning_sdk-0.1.35.dist-info}/entry_points.txt +0 -0
  34. {lightning_sdk-0.1.33.dist-info → lightning_sdk-0.1.35.dist-info}/top_level.txt +0 -0
lightning_sdk/__init__.py CHANGED
@@ -27,5 +27,5 @@ __all__ = [
27
27
  "AIHub",
28
28
  ]
29
29
 
30
- __version__ = "0.1.33"
30
+ __version__ = "0.1.35"
31
31
  _check_version_and_prompt_upgrade(__version__)
lightning_sdk/ai_hub.py CHANGED
@@ -1,7 +1,9 @@
1
1
  from typing import TYPE_CHECKING, Any, Dict, List, Optional, Union
2
+ from urllib.parse import quote
2
3
 
3
4
  from lightning_sdk.api import AIHubApi, UserApi
4
5
  from lightning_sdk.lightning_cloud import login
6
+ from lightning_sdk.lightning_cloud.env import LIGHTNING_CLOUD_URL
5
7
  from lightning_sdk.user import User
6
8
  from lightning_sdk.utils.resolve import _resolve_org, _resolve_teamspace
7
9
 
@@ -21,12 +23,66 @@ class AIHub:
21
23
  self._api = AIHubApi()
22
24
  self._auth = None
23
25
 
26
+ def api_info(self, api_id: str) -> dict:
27
+ """Get full API template info such as input details.
28
+
29
+ Example:
30
+ ai_hub = AIHub()
31
+ api_info = ai_hub.api_info("api_12345")
32
+
33
+ Args:
34
+ api_id: The ID of the API for which information is requested.
35
+
36
+ Returns:
37
+ A dictionary containing detailed information about the API,
38
+ including its name, description, creation and update timestamps,
39
+ parameters, tags, job specifications, and autoscaling settings.
40
+ """
41
+ template = self._api.api_info(api_id)
42
+
43
+ api_arguments = [
44
+ {
45
+ "name": param.name,
46
+ "short_description": param.short_description,
47
+ "required": param.required,
48
+ "default": param.input.default_value,
49
+ }
50
+ for param in template.parameter_spec.parameters
51
+ ]
52
+
53
+ return {
54
+ "name": template.name,
55
+ "description": template.description,
56
+ "created_at": template.created_at,
57
+ "updated_at": template.updated_at,
58
+ "api_arguments": api_arguments,
59
+ "tags": [tag.name for tag in template.tags],
60
+ "job": {
61
+ "image": template.spec_v2.job.image,
62
+ "interruptible": template.spec_v2.job.spot,
63
+ "instance_type": template.spec_v2.job.instance_type,
64
+ "resources": template.spec_v2.job.resources,
65
+ },
66
+ "autoscaling": {
67
+ "enabled": template.spec_v2.autoscaling.enabled,
68
+ "min_replicas": template.spec_v2.autoscaling.min_replicas,
69
+ "max_replicas": template.spec_v2.autoscaling.max_replicas,
70
+ },
71
+ }
72
+
24
73
  def list_apis(self, search: Optional[str] = None) -> List[Dict[str, str]]:
25
74
  """Get a list of AI Hub API templates.
26
75
 
27
76
  Example:
28
- api_hub = AIHub()
29
- api_list = api_hub.list_apis(search="Llama")
77
+ ai_hub = AIHub()
78
+ api_list = ai_hub.list_apis(search="Llama")
79
+
80
+ Args:
81
+ search: A search query to filter the list of APIs. Defaults to None.
82
+
83
+ Returns:
84
+ A list of dictionaries, each containing information about an API,
85
+ such as its ID, name, description, creator's username, and creation timestamp.
30
86
  """
31
87
  search_query = search or ""
32
88
  api_templates = self._api.list_apis(search_query=search_query)
@@ -82,7 +138,7 @@ class AIHub:
82
138
 
83
139
  Args:
84
140
  api_id: The ID of the API you want to deploy.
85
- cluster: The cluster where you want to deploy the API, such as "lightning-public-prod".
141
+ cluster: The cluster where you want to deploy the API, such as "lightning-public-prod". Defaults to None.
86
142
  name: Name for the deployed API. Defaults to None.
87
143
  teamspace: The team or group for deployment. Defaults to None.
88
144
  org: The organization for deployment. Defaults to None.
@@ -102,6 +158,8 @@ class AIHub:
102
158
  deployment = self._api.deploy_api(
103
159
  template_id=api_id, cluster_id=cluster, project_id=teamspace_id, name=name, **kwargs
104
160
  )
161
+ url = quote(f"{LIGHTNING_CLOUD_URL}/{teamspace._org.name}/{teamspace.name}/jobs/{deployment.name}", safe=":/()")
162
+ print("Deployment available at:", url)
105
163
  return {
106
164
  "id": deployment.id,
107
165
  "name": deployment.name,
@@ -1,9 +1,13 @@
1
1
  import re
2
+ import traceback
2
3
  from typing import List, Optional
3
4
 
5
+ import backoff
6
+
4
7
  from lightning_sdk.lightning_cloud.openapi.models import (
5
8
  CreateDeploymentRequestDefinesASpecForTheJobThatAllowsForAutoscalingJobs,
6
9
  V1Deployment,
10
+ V1DeploymentTemplate,
7
11
  V1ParameterizationSpec,
8
12
  )
9
13
  from lightning_sdk.lightning_cloud.openapi.models.v1_deployment_template_gallery_response import (
@@ -16,6 +20,16 @@ class AIHubApi:
16
20
  def __init__(self) -> None:
17
21
  self._client = LightningClient(max_tries=3)
18
22
 
23
+ def api_info(self, api_id: str) -> "V1DeploymentTemplate":
24
+ try:
25
+ return self._client.deployment_templates_service_get_deployment_template(api_id)
26
+ except Exception as e:
27
+ stack_trace = traceback.format_exc()
28
+ if "record not found" in stack_trace:
29
+ raise ValueError(f"api_id={api_id} not found.") from None
30
+ raise e
31
+
32
+ @backoff.on_predicate(backoff.expo, lambda x: not x, max_tries=5)
19
33
  def list_apis(self, search_query: str) -> List[V1DeploymentTemplateGalleryResponse]:
20
34
  kwargs = {"show_globally_visible": True}
21
35
  return self._client.deployment_templates_service_list_published_deployment_templates(
@@ -0,0 +1,49 @@
1
+ from typing import List, Optional
2
+
3
+ from lightning_sdk.ai_hub import AIHub
4
+ from lightning_sdk.cli.studios_menu import _StudiosMenu
5
+
6
+
7
+ class _AIHub(_StudiosMenu):
8
+ """Interact with Lightning Studio - AI Hub."""
9
+
10
+ def __init__(self) -> None:
11
+ self._hub = AIHub()
12
+
13
+ def api_info(self, api_id: str) -> dict:
14
+ """Get full API template info such as input details.
15
+
16
+ Example:
17
+ lightning aihub api_info [API_ID]
18
+
19
+ Args:
20
+ api_id: The ID of the API for which information is requested.
21
+ """
22
+ return self._hub.api_info(api_id)
23
+
24
+ def list_apis(self, search: Optional[str] = None) -> List[dict]:
25
+ """List API templates available in the AI Hub.
26
+
27
+ Args:
28
+ search: Search for API templates by name.
29
+ """
30
+ return self._hub.list_apis(search=search)
31
+
32
+ def deploy(
33
+ self,
34
+ api_id: str,
35
+ cluster: Optional[str] = None,
36
+ name: Optional[str] = None,
37
+ teamspace: Optional[str] = None,
38
+ org: Optional[str] = None,
39
+ ) -> dict:
40
+ """Deploy an API template from the AI Hub.
41
+
42
+ Args:
43
+ api_id: API template ID.
44
+ cluster: Cluster to deploy the API to. Defaults to user's default cluster.
45
+ name: Name of the deployed API. Defaults to the name of the API template.
46
+ teamspace: Teamspace to deploy the API to. Defaults to user's default teamspace.
47
+ org: Organization to deploy the API to. Defaults to user's default organization.
48
+ """
49
+ return self._hub.deploy(api_id, cluster=cluster, name=name, teamspace=teamspace, org=org)
@@ -13,19 +13,19 @@ from lightning_sdk.utils.resolve import _get_authed_user, skip_studio_init
13
13
  class _Downloads(_StudiosMenu):
14
14
  """Download files and folders from Lightning AI."""
15
15
 
16
- def model(self, name: str, path: Optional[str] = None) -> None:
16
+ def model(self, name: str, download_dir: str = ".") -> None:
17
17
  """Download a Model.
18
18
 
19
19
  Args:
20
20
  name: The name of the Model you want to download.
21
21
  This should have the format <ORGANIZATION-NAME>/<TEAMSPACE-NAME>/<MODEL-NAME>.
22
- path: The path to the directory where the Model should be downloaded.
22
+ download_dir: The directory where the Model should be downloaded.
23
23
  """
24
24
  org_name, teamspace_name, model_name = _parse_model_name(name)
25
25
  teamspace = _get_teamspace(name=teamspace_name, organization=org_name)
26
26
  teamspace.download_model(
27
27
  name=model_name,
28
- download_dir=path or ".",
28
+ download_dir=download_dir,
29
29
  progress_bar=True,
30
30
  )
31
31
 
@@ -2,6 +2,7 @@ from fire import Fire
2
2
  from lightning_utilities.core.imports import RequirementCache
3
3
 
4
4
  from lightning_sdk.api.studio_api import _cloud_url
5
+ from lightning_sdk.cli.ai_hub import _AIHub
5
6
  from lightning_sdk.cli.download import _Downloads
6
7
  from lightning_sdk.cli.legacy import _LegacyLightningCLI
7
8
  from lightning_sdk.cli.upload import _Uploads
@@ -16,6 +17,7 @@ class StudioCLI:
16
17
  def __init__(self) -> None:
17
18
  self.download = _Downloads()
18
19
  self.upload = _Uploads()
20
+ self.aihub = _AIHub()
19
21
 
20
22
  if _LIGHTNING_AVAILABLE:
21
23
  self.run = _LegacyLightningCLI()
@@ -8,7 +8,7 @@ from dataclasses import dataclass
8
8
  from typing import Optional
9
9
  from urllib.parse import urlencode
10
10
 
11
- import click
11
+ import webbrowser
12
12
 
13
13
  import requests
14
14
  import uvicorn
@@ -165,7 +165,10 @@ class AuthServer:
165
165
  )
166
166
 
167
167
  logger.info(f"login started for lightning.ai, opening {url}")
168
- click.launch(url)
168
+ ok = webbrowser.open(url)
169
+ if not ok:
170
+ # can't open a browser, authentication failed
171
+ raise RuntimeError("Failed to authenticate to Lightning. When running without access to a browser, `LIGHTNING_USER_ID` and `LIGHTNING_API_KEY` should be exported.")
169
172
 
170
173
  @app.get("/login-complete")
171
174
  async def save_token(request: Request,
@@ -226,6 +226,7 @@ from lightning_sdk.lightning_cloud.openapi.models.v1_cancellation_metadata impor
226
226
  from lightning_sdk.lightning_cloud.openapi.models.v1_capacity_block_offering import V1CapacityBlockOffering
227
227
  from lightning_sdk.lightning_cloud.openapi.models.v1_check_external_service_status_response import V1CheckExternalServiceStatusResponse
228
228
  from lightning_sdk.lightning_cloud.openapi.models.v1_check_snowflake_connection_response import V1CheckSnowflakeConnectionResponse
229
+ from lightning_sdk.lightning_cloud.openapi.models.v1_checkbox import V1Checkbox
229
230
  from lightning_sdk.lightning_cloud.openapi.models.v1_cloud_space import V1CloudSpace
230
231
  from lightning_sdk.lightning_cloud.openapi.models.v1_cloud_space_app import V1CloudSpaceApp
231
232
  from lightning_sdk.lightning_cloud.openapi.models.v1_cloud_space_app_action import V1CloudSpaceAppAction
@@ -5610,6 +5610,7 @@ class CloudSpaceServiceApi(object):
5610
5610
  :param str cloud_space_id: (required)
5611
5611
  :param bool draft:
5612
5612
  :param str limit:
5613
+ :param bool include_publications:
5613
5614
  :return: V1ListCloudSpaceVersionsResponse
5614
5615
  If the method is called asynchronously,
5615
5616
  returns the request thread.
@@ -5634,12 +5635,13 @@ class CloudSpaceServiceApi(object):
5634
5635
  :param str cloud_space_id: (required)
5635
5636
  :param bool draft:
5636
5637
  :param str limit:
5638
+ :param bool include_publications:
5637
5639
  :return: V1ListCloudSpaceVersionsResponse
5638
5640
  If the method is called asynchronously,
5639
5641
  returns the request thread.
5640
5642
  """
5641
5643
 
5642
- all_params = ['project_id', 'cloud_space_id', 'draft', 'limit'] # noqa: E501
5644
+ all_params = ['project_id', 'cloud_space_id', 'draft', 'limit', 'include_publications'] # noqa: E501
5643
5645
  all_params.append('async_req')
5644
5646
  all_params.append('_return_http_data_only')
5645
5647
  all_params.append('_preload_content')
@@ -5676,6 +5678,8 @@ class CloudSpaceServiceApi(object):
5676
5678
  query_params.append(('draft', params['draft'])) # noqa: E501
5677
5679
  if 'limit' in params:
5678
5680
  query_params.append(('limit', params['limit'])) # noqa: E501
5681
+ if 'include_publications' in params:
5682
+ query_params.append(('includePublications', params['include_publications'])) # noqa: E501
5679
5683
 
5680
5684
  header_params = {}
5681
5685
 
@@ -190,6 +190,7 @@ from lightning_sdk.lightning_cloud.openapi.models.v1_cancellation_metadata impor
190
190
  from lightning_sdk.lightning_cloud.openapi.models.v1_capacity_block_offering import V1CapacityBlockOffering
191
191
  from lightning_sdk.lightning_cloud.openapi.models.v1_check_external_service_status_response import V1CheckExternalServiceStatusResponse
192
192
  from lightning_sdk.lightning_cloud.openapi.models.v1_check_snowflake_connection_response import V1CheckSnowflakeConnectionResponse
193
+ from lightning_sdk.lightning_cloud.openapi.models.v1_checkbox import V1Checkbox
193
194
  from lightning_sdk.lightning_cloud.openapi.models.v1_cloud_space import V1CloudSpace
194
195
  from lightning_sdk.lightning_cloud.openapi.models.v1_cloud_space_app import V1CloudSpaceApp
195
196
  from lightning_sdk.lightning_cloud.openapi.models.v1_cloud_space_app_action import V1CloudSpaceAppAction
@@ -42,6 +42,7 @@ class CreateDeploymentRequestDefinesASpecForTheJobThatAllowsForAutoscalingJobs(o
42
42
  """
43
43
  swagger_types = {
44
44
  'autoscaling': 'V1AutoscalingSpec',
45
+ 'cloudspace_id': 'str',
45
46
  'cluster_id': 'str',
46
47
  'endpoint': 'V1Endpoint',
47
48
  'name': 'str',
@@ -53,6 +54,7 @@ class CreateDeploymentRequestDefinesASpecForTheJobThatAllowsForAutoscalingJobs(o
53
54
 
54
55
  attribute_map = {
55
56
  'autoscaling': 'autoscaling',
57
+ 'cloudspace_id': 'cloudspaceId',
56
58
  'cluster_id': 'clusterId',
57
59
  'endpoint': 'endpoint',
58
60
  'name': 'name',
@@ -62,9 +64,10 @@ class CreateDeploymentRequestDefinesASpecForTheJobThatAllowsForAutoscalingJobs(o
62
64
  'strategy': 'strategy'
63
65
  }
64
66
 
65
- def __init__(self, autoscaling: 'V1AutoscalingSpec' =None, cluster_id: 'str' =None, endpoint: 'V1Endpoint' =None, name: 'str' =None, parameter_spec: 'V1ParameterizationSpec' =None, replicas: 'int' =None, spec: 'V1JobSpec' =None, strategy: 'V1DeploymentStrategy' =None): # noqa: E501
67
+ def __init__(self, autoscaling: 'V1AutoscalingSpec' =None, cloudspace_id: 'str' =None, cluster_id: 'str' =None, endpoint: 'V1Endpoint' =None, name: 'str' =None, parameter_spec: 'V1ParameterizationSpec' =None, replicas: 'int' =None, spec: 'V1JobSpec' =None, strategy: 'V1DeploymentStrategy' =None): # noqa: E501
66
68
  """CreateDeploymentRequestDefinesASpecForTheJobThatAllowsForAutoscalingJobs - a model defined in Swagger""" # noqa: E501
67
69
  self._autoscaling = None
70
+ self._cloudspace_id = None
68
71
  self._cluster_id = None
69
72
  self._endpoint = None
70
73
  self._name = None
@@ -75,6 +78,8 @@ class CreateDeploymentRequestDefinesASpecForTheJobThatAllowsForAutoscalingJobs(o
75
78
  self.discriminator = None
76
79
  if autoscaling is not None:
77
80
  self.autoscaling = autoscaling
81
+ if cloudspace_id is not None:
82
+ self.cloudspace_id = cloudspace_id
78
83
  if cluster_id is not None:
79
84
  self.cluster_id = cluster_id
80
85
  if endpoint is not None:
@@ -111,6 +116,27 @@ class CreateDeploymentRequestDefinesASpecForTheJobThatAllowsForAutoscalingJobs(o
111
116
 
112
117
  self._autoscaling = autoscaling
113
118
 
119
+ @property
120
+ def cloudspace_id(self) -> 'str':
121
+ """Gets the cloudspace_id of this CreateDeploymentRequestDefinesASpecForTheJobThatAllowsForAutoscalingJobs. # noqa: E501
122
+
123
+
124
+ :return: The cloudspace_id of this CreateDeploymentRequestDefinesASpecForTheJobThatAllowsForAutoscalingJobs. # noqa: E501
125
+ :rtype: str
126
+ """
127
+ return self._cloudspace_id
128
+
129
+ @cloudspace_id.setter
130
+ def cloudspace_id(self, cloudspace_id: 'str'):
131
+ """Sets the cloudspace_id of this CreateDeploymentRequestDefinesASpecForTheJobThatAllowsForAutoscalingJobs.
132
+
133
+
134
+ :param cloudspace_id: The cloudspace_id of this CreateDeploymentRequestDefinesASpecForTheJobThatAllowsForAutoscalingJobs. # noqa: E501
135
+ :type: str
136
+ """
137
+
138
+ self._cloudspace_id = cloudspace_id
139
+
114
140
  @property
115
141
  def cluster_id(self) -> 'str':
116
142
  """Gets the cluster_id of this CreateDeploymentRequestDefinesASpecForTheJobThatAllowsForAutoscalingJobs. # noqa: E501
@@ -42,6 +42,7 @@ class DeploymentsIdBody(object):
42
42
  """
43
43
  swagger_types = {
44
44
  'autoscaling': 'V1AutoscalingSpec',
45
+ 'cloudspace_id': 'str',
45
46
  'created_at': 'datetime',
46
47
  'desired_state': 'V1DeploymentState',
47
48
  'endpoint': 'V1Endpoint',
@@ -59,6 +60,7 @@ class DeploymentsIdBody(object):
59
60
 
60
61
  attribute_map = {
61
62
  'autoscaling': 'autoscaling',
63
+ 'cloudspace_id': 'cloudspaceId',
62
64
  'created_at': 'createdAt',
63
65
  'desired_state': 'desiredState',
64
66
  'endpoint': 'endpoint',
@@ -74,9 +76,10 @@ class DeploymentsIdBody(object):
74
76
  'user_id': 'userId'
75
77
  }
76
78
 
77
- def __init__(self, autoscaling: 'V1AutoscalingSpec' =None, created_at: 'datetime' =None, desired_state: 'V1DeploymentState' =None, endpoint: 'V1Endpoint' =None, is_published: 'bool' =None, name: 'str' =None, parameter_spec: 'V1ParameterizationSpec' =None, release_id: 'str' =None, replicas: 'int' =None, spec: 'V1JobSpec' =None, status: 'V1DeploymentStatus' =None, strategy: 'V1DeploymentStrategy' =None, updated_at: 'datetime' =None, user_id: 'str' =None): # noqa: E501
79
+ def __init__(self, autoscaling: 'V1AutoscalingSpec' =None, cloudspace_id: 'str' =None, created_at: 'datetime' =None, desired_state: 'V1DeploymentState' =None, endpoint: 'V1Endpoint' =None, is_published: 'bool' =None, name: 'str' =None, parameter_spec: 'V1ParameterizationSpec' =None, release_id: 'str' =None, replicas: 'int' =None, spec: 'V1JobSpec' =None, status: 'V1DeploymentStatus' =None, strategy: 'V1DeploymentStrategy' =None, updated_at: 'datetime' =None, user_id: 'str' =None): # noqa: E501
78
80
  """DeploymentsIdBody - a model defined in Swagger""" # noqa: E501
79
81
  self._autoscaling = None
82
+ self._cloudspace_id = None
80
83
  self._created_at = None
81
84
  self._desired_state = None
82
85
  self._endpoint = None
@@ -93,6 +96,8 @@ class DeploymentsIdBody(object):
93
96
  self.discriminator = None
94
97
  if autoscaling is not None:
95
98
  self.autoscaling = autoscaling
99
+ if cloudspace_id is not None:
100
+ self.cloudspace_id = cloudspace_id
96
101
  if created_at is not None:
97
102
  self.created_at = created_at
98
103
  if desired_state is not None:
@@ -141,6 +146,27 @@ class DeploymentsIdBody(object):
141
146
 
142
147
  self._autoscaling = autoscaling
143
148
 
149
+ @property
150
+ def cloudspace_id(self) -> 'str':
151
+ """Gets the cloudspace_id of this DeploymentsIdBody. # noqa: E501
152
+
153
+
154
+ :return: The cloudspace_id of this DeploymentsIdBody. # noqa: E501
155
+ :rtype: str
156
+ """
157
+ return self._cloudspace_id
158
+
159
+ @cloudspace_id.setter
160
+ def cloudspace_id(self, cloudspace_id: 'str'):
161
+ """Sets the cloudspace_id of this DeploymentsIdBody.
162
+
163
+
164
+ :param cloudspace_id: The cloudspace_id of this DeploymentsIdBody. # noqa: E501
165
+ :type: str
166
+ """
167
+
168
+ self._cloudspace_id = cloudspace_id
169
+
144
170
  @property
145
171
  def created_at(self) -> 'datetime':
146
172
  """Gets the created_at of this DeploymentsIdBody. # noqa: E501
@@ -46,6 +46,7 @@ class SnowflakeExportBody(object):
46
46
  'compress': 'bool',
47
47
  'connection_id': 'str',
48
48
  'format': 'str',
49
+ 'include_header': 'bool',
49
50
  'password': 'str',
50
51
  'query': 'str',
51
52
  'query_name': 'str',
@@ -58,19 +59,21 @@ class SnowflakeExportBody(object):
58
59
  'compress': 'compress',
59
60
  'connection_id': 'connectionId',
60
61
  'format': 'format',
62
+ 'include_header': 'includeHeader',
61
63
  'password': 'password',
62
64
  'query': 'query',
63
65
  'query_name': 'queryName',
64
66
  'username': 'username'
65
67
  }
66
68
 
67
- def __init__(self, account: 'str' =None, cluster_id: 'str' =None, compress: 'bool' =None, connection_id: 'str' =None, format: 'str' =None, password: 'str' =None, query: 'str' =None, query_name: 'str' =None, username: 'str' =None): # noqa: E501
69
+ def __init__(self, account: 'str' =None, cluster_id: 'str' =None, compress: 'bool' =None, connection_id: 'str' =None, format: 'str' =None, include_header: 'bool' =None, password: 'str' =None, query: 'str' =None, query_name: 'str' =None, username: 'str' =None): # noqa: E501
68
70
  """SnowflakeExportBody - a model defined in Swagger""" # noqa: E501
69
71
  self._account = None
70
72
  self._cluster_id = None
71
73
  self._compress = None
72
74
  self._connection_id = None
73
75
  self._format = None
76
+ self._include_header = None
74
77
  self._password = None
75
78
  self._query = None
76
79
  self._query_name = None
@@ -86,6 +89,8 @@ class SnowflakeExportBody(object):
86
89
  self.connection_id = connection_id
87
90
  if format is not None:
88
91
  self.format = format
92
+ if include_header is not None:
93
+ self.include_header = include_header
89
94
  if password is not None:
90
95
  self.password = password
91
96
  if query is not None:
@@ -200,6 +205,27 @@ class SnowflakeExportBody(object):
200
205
 
201
206
  self._format = format
202
207
 
208
+ @property
209
+ def include_header(self) -> 'bool':
210
+ """Gets the include_header of this SnowflakeExportBody. # noqa: E501
211
+
212
+
213
+ :return: The include_header of this SnowflakeExportBody. # noqa: E501
214
+ :rtype: bool
215
+ """
216
+ return self._include_header
217
+
218
+ @include_header.setter
219
+ def include_header(self, include_header: 'bool'):
220
+ """Sets the include_header of this SnowflakeExportBody.
221
+
222
+
223
+ :param include_header: The include_header of this SnowflakeExportBody. # noqa: E501
224
+ :type: bool
225
+ """
226
+
227
+ self._include_header = include_header
228
+
203
229
  @property
204
230
  def password(self) -> 'str':
205
231
  """Gets the password of this SnowflakeExportBody. # noqa: E501
@@ -48,6 +48,7 @@ class V1CapacityBlockOffering(object):
48
48
  'fee': 'float',
49
49
  'instance_count': 'int',
50
50
  'instance_type': 'str',
51
+ 'provider_fee': 'float',
51
52
  'region': 'str',
52
53
  'start_date': 'datetime',
53
54
  'upfront_fee': 'float'
@@ -61,12 +62,13 @@ class V1CapacityBlockOffering(object):
61
62
  'fee': 'fee',
62
63
  'instance_count': 'instanceCount',
63
64
  'instance_type': 'instanceType',
65
+ 'provider_fee': 'providerFee',
64
66
  'region': 'region',
65
67
  'start_date': 'startDate',
66
68
  'upfront_fee': 'upfrontFee'
67
69
  }
68
70
 
69
- def __init__(self, capacity_block_duration_hours: 'int' =None, capacity_block_offering_id: 'str' =None, currency_code: 'str' =None, end_date: 'datetime' =None, fee: 'float' =None, instance_count: 'int' =None, instance_type: 'str' =None, region: 'str' =None, start_date: 'datetime' =None, upfront_fee: 'float' =None): # noqa: E501
71
+ def __init__(self, capacity_block_duration_hours: 'int' =None, capacity_block_offering_id: 'str' =None, currency_code: 'str' =None, end_date: 'datetime' =None, fee: 'float' =None, instance_count: 'int' =None, instance_type: 'str' =None, provider_fee: 'float' =None, region: 'str' =None, start_date: 'datetime' =None, upfront_fee: 'float' =None): # noqa: E501
70
72
  """V1CapacityBlockOffering - a model defined in Swagger""" # noqa: E501
71
73
  self._capacity_block_duration_hours = None
72
74
  self._capacity_block_offering_id = None
@@ -75,6 +77,7 @@ class V1CapacityBlockOffering(object):
75
77
  self._fee = None
76
78
  self._instance_count = None
77
79
  self._instance_type = None
80
+ self._provider_fee = None
78
81
  self._region = None
79
82
  self._start_date = None
80
83
  self._upfront_fee = None
@@ -93,6 +96,8 @@ class V1CapacityBlockOffering(object):
93
96
  self.instance_count = instance_count
94
97
  if instance_type is not None:
95
98
  self.instance_type = instance_type
99
+ if provider_fee is not None:
100
+ self.provider_fee = provider_fee
96
101
  if region is not None:
97
102
  self.region = region
98
103
  if start_date is not None:
@@ -247,6 +252,27 @@ class V1CapacityBlockOffering(object):
247
252
 
248
253
  self._instance_type = instance_type
249
254
 
255
+ @property
256
+ def provider_fee(self) -> 'float':
257
+ """Gets the provider_fee of this V1CapacityBlockOffering. # noqa: E501
258
+
259
+
260
+ :return: The provider_fee of this V1CapacityBlockOffering. # noqa: E501
261
+ :rtype: float
262
+ """
263
+ return self._provider_fee
264
+
265
+ @provider_fee.setter
266
+ def provider_fee(self, provider_fee: 'float'):
267
+ """Sets the provider_fee of this V1CapacityBlockOffering.
268
+
269
+
270
+ :param provider_fee: The provider_fee of this V1CapacityBlockOffering. # noqa: E501
271
+ :type: float
272
+ """
273
+
274
+ self._provider_fee = provider_fee
275
+
250
276
  @property
251
277
  def region(self) -> 'str':
252
278
  """Gets the region of this V1CapacityBlockOffering. # noqa: E501