lightning-sdk 0.2.18__py3-none-any.whl → 0.2.20__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 (68) hide show
  1. lightning_sdk/__init__.py +1 -1
  2. lightning_sdk/api/deployment_api.py +2 -0
  3. lightning_sdk/api/license_api.py +28 -6
  4. lightning_sdk/cli/deploy/_auth.py +11 -19
  5. lightning_sdk/cli/entrypoint.py +20 -2
  6. lightning_sdk/deployment/deployment.py +2 -0
  7. lightning_sdk/lightning_cloud/login.py +2 -2
  8. lightning_sdk/lightning_cloud/openapi/__init__.py +10 -2
  9. lightning_sdk/lightning_cloud/openapi/api/__init__.py +1 -0
  10. lightning_sdk/lightning_cloud/openapi/api/blog_posts_service_api.py +533 -0
  11. lightning_sdk/lightning_cloud/openapi/api/cloud_space_service_api.py +113 -0
  12. lightning_sdk/lightning_cloud/openapi/api/jobs_service_api.py +121 -0
  13. lightning_sdk/lightning_cloud/openapi/models/__init__.py +9 -2
  14. lightning_sdk/lightning_cloud/openapi/models/alertingevents_id_body.py +409 -0
  15. lightning_sdk/lightning_cloud/openapi/models/blogposts_id_body.py +253 -0
  16. lightning_sdk/lightning_cloud/openapi/models/deployments_id_body.py +27 -1
  17. lightning_sdk/lightning_cloud/openapi/models/id_codeconfig_body.py +29 -3
  18. lightning_sdk/lightning_cloud/openapi/models/id_transfer_body.py +123 -0
  19. lightning_sdk/lightning_cloud/openapi/models/orgs_id_body.py +157 -157
  20. lightning_sdk/lightning_cloud/openapi/models/projects_id_body.py +79 -1
  21. lightning_sdk/lightning_cloud/openapi/models/update.py +27 -1
  22. lightning_sdk/lightning_cloud/openapi/models/v1_author.py +201 -0
  23. lightning_sdk/lightning_cloud/openapi/models/v1_blog_post.py +383 -0
  24. lightning_sdk/lightning_cloud/openapi/models/v1_cloud_space.py +27 -1
  25. lightning_sdk/lightning_cloud/openapi/models/v1_cloud_space_environment_template.py +27 -1
  26. lightning_sdk/lightning_cloud/openapi/models/v1_cloud_space_environment_template_config.py +27 -1
  27. lightning_sdk/lightning_cloud/openapi/models/v1_cloud_space_state.py +1 -0
  28. lightning_sdk/lightning_cloud/openapi/models/v1_create_blog_post_request.py +253 -0
  29. lightning_sdk/lightning_cloud/openapi/models/v1_create_cloud_space_environment_template_request.py +27 -1
  30. lightning_sdk/lightning_cloud/openapi/models/v1_daily_usage.py +81 -3
  31. lightning_sdk/lightning_cloud/openapi/models/v1_data_connection.py +79 -1
  32. lightning_sdk/lightning_cloud/openapi/models/v1_delete_blog_post_response.py +123 -0
  33. lightning_sdk/lightning_cloud/openapi/models/v1_deployment.py +27 -1
  34. lightning_sdk/lightning_cloud/openapi/models/v1_deployment_alerting_policy_type.py +1 -0
  35. lightning_sdk/lightning_cloud/openapi/models/v1_get_organization_storage_metadata_response.py +157 -1
  36. lightning_sdk/lightning_cloud/openapi/models/v1_get_project_storage_metadata_response.py +237 -3
  37. lightning_sdk/lightning_cloud/openapi/models/v1_get_user_storage_breakdown_response.py +53 -1
  38. lightning_sdk/lightning_cloud/openapi/models/v1_google_cloud_direct_v1.py +53 -1
  39. lightning_sdk/lightning_cloud/openapi/models/v1_list_blog_posts_response.py +175 -0
  40. lightning_sdk/lightning_cloud/openapi/models/v1_membership.py +27 -1
  41. lightning_sdk/lightning_cloud/openapi/models/v1_message.py +27 -1
  42. lightning_sdk/lightning_cloud/openapi/models/v1_notification_type.py +1 -0
  43. lightning_sdk/lightning_cloud/openapi/models/v1_organization.py +261 -157
  44. lightning_sdk/lightning_cloud/openapi/models/v1_product_license.py +27 -1
  45. lightning_sdk/lightning_cloud/openapi/models/v1_project.py +53 -1
  46. lightning_sdk/lightning_cloud/openapi/models/v1_project_membership.py +27 -1
  47. lightning_sdk/lightning_cloud/openapi/models/v1_project_settings.py +79 -1
  48. lightning_sdk/lightning_cloud/openapi/models/v1_project_storage.py +199 -17
  49. lightning_sdk/lightning_cloud/openapi/models/v1_rule_resource.py +1 -0
  50. lightning_sdk/lightning_cloud/openapi/models/v1_storage_asset.py +27 -1
  51. lightning_sdk/lightning_cloud/openapi/models/v1_storage_asset_type.py +4 -0
  52. lightning_sdk/lightning_cloud/openapi/models/v1_transaction.py +27 -1
  53. lightning_sdk/lightning_cloud/openapi/models/v1_transfer_cloud_space_response.py +97 -0
  54. lightning_sdk/lightning_cloud/openapi/models/v1_usage.py +105 -27
  55. lightning_sdk/lightning_cloud/openapi/models/v1_user_features.py +249 -145
  56. lightning_sdk/lightning_cloud/openapi/models/v1_volume.py +499 -31
  57. lightning_sdk/lightning_cloud/rest_client.py +13 -11
  58. lightning_sdk/lightning_cloud/source_code/logs_socket_api.py +8 -3
  59. lightning_sdk/serve.py +1 -0
  60. lightning_sdk/services/license.py +148 -27
  61. {lightning_sdk-0.2.18.dist-info → lightning_sdk-0.2.20.dist-info}/METADATA +1 -1
  62. {lightning_sdk-0.2.18.dist-info → lightning_sdk-0.2.20.dist-info}/RECORD +66 -58
  63. lightning_sdk/lightning_cloud/openapi/models/v1_ebs.py +0 -279
  64. lightning_sdk/lightning_cloud/openapi/models/v1_reservation_billing_session.py +0 -279
  65. {lightning_sdk-0.2.18.dist-info → lightning_sdk-0.2.20.dist-info}/LICENSE +0 -0
  66. {lightning_sdk-0.2.18.dist-info → lightning_sdk-0.2.20.dist-info}/WHEEL +0 -0
  67. {lightning_sdk-0.2.18.dist-info → lightning_sdk-0.2.20.dist-info}/entry_points.txt +0 -0
  68. {lightning_sdk-0.2.18.dist-info → lightning_sdk-0.2.20.dist-info}/top_level.txt +0 -0
@@ -0,0 +1,253 @@
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 BlogpostsIdBody(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
+ 'author_id': 'str',
45
+ 'category': 'str',
46
+ 'description': 'str',
47
+ 'image_url': 'str',
48
+ 'lit_page_id': 'str',
49
+ 'title': 'str'
50
+ }
51
+
52
+ attribute_map = {
53
+ 'author_id': 'authorId',
54
+ 'category': 'category',
55
+ 'description': 'description',
56
+ 'image_url': 'imageUrl',
57
+ 'lit_page_id': 'litPageId',
58
+ 'title': 'title'
59
+ }
60
+
61
+ def __init__(self, author_id: 'str' =None, category: 'str' =None, description: 'str' =None, image_url: 'str' =None, lit_page_id: 'str' =None, title: 'str' =None): # noqa: E501
62
+ """BlogpostsIdBody - a model defined in Swagger""" # noqa: E501
63
+ self._author_id = None
64
+ self._category = None
65
+ self._description = None
66
+ self._image_url = None
67
+ self._lit_page_id = None
68
+ self._title = None
69
+ self.discriminator = None
70
+ if author_id is not None:
71
+ self.author_id = author_id
72
+ if category is not None:
73
+ self.category = category
74
+ if description is not None:
75
+ self.description = description
76
+ if image_url is not None:
77
+ self.image_url = image_url
78
+ if lit_page_id is not None:
79
+ self.lit_page_id = lit_page_id
80
+ if title is not None:
81
+ self.title = title
82
+
83
+ @property
84
+ def author_id(self) -> 'str':
85
+ """Gets the author_id of this BlogpostsIdBody. # noqa: E501
86
+
87
+
88
+ :return: The author_id of this BlogpostsIdBody. # noqa: E501
89
+ :rtype: str
90
+ """
91
+ return self._author_id
92
+
93
+ @author_id.setter
94
+ def author_id(self, author_id: 'str'):
95
+ """Sets the author_id of this BlogpostsIdBody.
96
+
97
+
98
+ :param author_id: The author_id of this BlogpostsIdBody. # noqa: E501
99
+ :type: str
100
+ """
101
+
102
+ self._author_id = author_id
103
+
104
+ @property
105
+ def category(self) -> 'str':
106
+ """Gets the category of this BlogpostsIdBody. # noqa: E501
107
+
108
+
109
+ :return: The category of this BlogpostsIdBody. # noqa: E501
110
+ :rtype: str
111
+ """
112
+ return self._category
113
+
114
+ @category.setter
115
+ def category(self, category: 'str'):
116
+ """Sets the category of this BlogpostsIdBody.
117
+
118
+
119
+ :param category: The category of this BlogpostsIdBody. # noqa: E501
120
+ :type: str
121
+ """
122
+
123
+ self._category = category
124
+
125
+ @property
126
+ def description(self) -> 'str':
127
+ """Gets the description of this BlogpostsIdBody. # noqa: E501
128
+
129
+
130
+ :return: The description of this BlogpostsIdBody. # noqa: E501
131
+ :rtype: str
132
+ """
133
+ return self._description
134
+
135
+ @description.setter
136
+ def description(self, description: 'str'):
137
+ """Sets the description of this BlogpostsIdBody.
138
+
139
+
140
+ :param description: The description of this BlogpostsIdBody. # noqa: E501
141
+ :type: str
142
+ """
143
+
144
+ self._description = description
145
+
146
+ @property
147
+ def image_url(self) -> 'str':
148
+ """Gets the image_url of this BlogpostsIdBody. # noqa: E501
149
+
150
+
151
+ :return: The image_url of this BlogpostsIdBody. # noqa: E501
152
+ :rtype: str
153
+ """
154
+ return self._image_url
155
+
156
+ @image_url.setter
157
+ def image_url(self, image_url: 'str'):
158
+ """Sets the image_url of this BlogpostsIdBody.
159
+
160
+
161
+ :param image_url: The image_url of this BlogpostsIdBody. # noqa: E501
162
+ :type: str
163
+ """
164
+
165
+ self._image_url = image_url
166
+
167
+ @property
168
+ def lit_page_id(self) -> 'str':
169
+ """Gets the lit_page_id of this BlogpostsIdBody. # noqa: E501
170
+
171
+
172
+ :return: The lit_page_id of this BlogpostsIdBody. # noqa: E501
173
+ :rtype: str
174
+ """
175
+ return self._lit_page_id
176
+
177
+ @lit_page_id.setter
178
+ def lit_page_id(self, lit_page_id: 'str'):
179
+ """Sets the lit_page_id of this BlogpostsIdBody.
180
+
181
+
182
+ :param lit_page_id: The lit_page_id of this BlogpostsIdBody. # noqa: E501
183
+ :type: str
184
+ """
185
+
186
+ self._lit_page_id = lit_page_id
187
+
188
+ @property
189
+ def title(self) -> 'str':
190
+ """Gets the title of this BlogpostsIdBody. # noqa: E501
191
+
192
+
193
+ :return: The title of this BlogpostsIdBody. # noqa: E501
194
+ :rtype: str
195
+ """
196
+ return self._title
197
+
198
+ @title.setter
199
+ def title(self, title: 'str'):
200
+ """Sets the title of this BlogpostsIdBody.
201
+
202
+
203
+ :param title: The title of this BlogpostsIdBody. # noqa: E501
204
+ :type: str
205
+ """
206
+
207
+ self._title = title
208
+
209
+ def to_dict(self) -> dict:
210
+ """Returns the model properties as a dict"""
211
+ result = {}
212
+
213
+ for attr, _ in six.iteritems(self.swagger_types):
214
+ value = getattr(self, attr)
215
+ if isinstance(value, list):
216
+ result[attr] = list(map(
217
+ lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
218
+ value
219
+ ))
220
+ elif hasattr(value, "to_dict"):
221
+ result[attr] = value.to_dict()
222
+ elif isinstance(value, dict):
223
+ result[attr] = dict(map(
224
+ lambda item: (item[0], item[1].to_dict())
225
+ if hasattr(item[1], "to_dict") else item,
226
+ value.items()
227
+ ))
228
+ else:
229
+ result[attr] = value
230
+ if issubclass(BlogpostsIdBody, dict):
231
+ for key, value in self.items():
232
+ result[key] = value
233
+
234
+ return result
235
+
236
+ def to_str(self) -> str:
237
+ """Returns the string representation of the model"""
238
+ return pprint.pformat(self.to_dict())
239
+
240
+ def __repr__(self) -> str:
241
+ """For `print` and `pprint`"""
242
+ return self.to_str()
243
+
244
+ def __eq__(self, other: 'BlogpostsIdBody') -> bool:
245
+ """Returns true if both objects are equal"""
246
+ if not isinstance(other, BlogpostsIdBody):
247
+ return False
248
+
249
+ return self.__dict__ == other.__dict__
250
+
251
+ def __ne__(self, other: 'BlogpostsIdBody') -> bool:
252
+ """Returns true if both objects are not equal"""
253
+ return not self == other
@@ -41,6 +41,7 @@ class DeploymentsIdBody(object):
41
41
  and the value is json key in definition.
42
42
  """
43
43
  swagger_types = {
44
+ 'source': 'str',
44
45
  'api_standard': 'str',
45
46
  'apis': 'list[V1DeploymentAPI]',
46
47
  'assistant_id': 'str',
@@ -72,6 +73,7 @@ class DeploymentsIdBody(object):
72
73
  }
73
74
 
74
75
  attribute_map = {
76
+ 'source': 'Source',
75
77
  'api_standard': 'apiStandard',
76
78
  'apis': 'apis',
77
79
  'assistant_id': 'assistantId',
@@ -102,8 +104,9 @@ class DeploymentsIdBody(object):
102
104
  'visibility': 'visibility'
103
105
  }
104
106
 
105
- def __init__(self, api_standard: 'str' =None, apis: 'list[V1DeploymentAPI]' =None, assistant_id: 'str' =None, autoscaling: 'V1AutoscalingSpec' =None, cloudspace_id: 'str' =None, created_at: 'datetime' =None, current_state: 'V1DeploymentState' =None, debug: 'bool' =None, desired_state: 'V1DeploymentState' =None, endpoint: 'V1Endpoint' =None, is_published: 'bool' =None, managed: 'bool' =None, managed_endpoint_id: 'str' =None, name: 'str' =None, oncall_notification: 'bool' =None, parameter_spec: 'V1ParameterizationSpec' =None, pipeline_id: 'str' =None, recipients: 'V1DeploymentAlertingRecipients' =None, release_id: 'str' =None, replicas: 'int' =None, spec: 'V1JobSpec' =None, status: 'V1DeploymentStatus' =None, strategy: 'V1DeploymentStrategy' =None, template_id: 'str' =None, total_cost: 'float' =None, updated_at: 'datetime' =None, user_id: 'str' =None, visibility: 'V1ResourceVisibility' =None): # noqa: E501
107
+ def __init__(self, source: 'str' =None, api_standard: 'str' =None, apis: 'list[V1DeploymentAPI]' =None, assistant_id: 'str' =None, autoscaling: 'V1AutoscalingSpec' =None, cloudspace_id: 'str' =None, created_at: 'datetime' =None, current_state: 'V1DeploymentState' =None, debug: 'bool' =None, desired_state: 'V1DeploymentState' =None, endpoint: 'V1Endpoint' =None, is_published: 'bool' =None, managed: 'bool' =None, managed_endpoint_id: 'str' =None, name: 'str' =None, oncall_notification: 'bool' =None, parameter_spec: 'V1ParameterizationSpec' =None, pipeline_id: 'str' =None, recipients: 'V1DeploymentAlertingRecipients' =None, release_id: 'str' =None, replicas: 'int' =None, spec: 'V1JobSpec' =None, status: 'V1DeploymentStatus' =None, strategy: 'V1DeploymentStrategy' =None, template_id: 'str' =None, total_cost: 'float' =None, updated_at: 'datetime' =None, user_id: 'str' =None, visibility: 'V1ResourceVisibility' =None): # noqa: E501
106
108
  """DeploymentsIdBody - a model defined in Swagger""" # noqa: E501
109
+ self._source = None
107
110
  self._api_standard = None
108
111
  self._apis = None
109
112
  self._assistant_id = None
@@ -133,6 +136,8 @@ class DeploymentsIdBody(object):
133
136
  self._user_id = None
134
137
  self._visibility = None
135
138
  self.discriminator = None
139
+ if source is not None:
140
+ self.source = source
136
141
  if api_standard is not None:
137
142
  self.api_standard = api_standard
138
143
  if apis is not None:
@@ -190,6 +195,27 @@ class DeploymentsIdBody(object):
190
195
  if visibility is not None:
191
196
  self.visibility = visibility
192
197
 
198
+ @property
199
+ def source(self) -> 'str':
200
+ """Gets the source of this DeploymentsIdBody. # noqa: E501
201
+
202
+
203
+ :return: The source of this DeploymentsIdBody. # noqa: E501
204
+ :rtype: str
205
+ """
206
+ return self._source
207
+
208
+ @source.setter
209
+ def source(self, source: 'str'):
210
+ """Sets the source of this DeploymentsIdBody.
211
+
212
+
213
+ :param source: The source of this DeploymentsIdBody. # noqa: E501
214
+ :type: str
215
+ """
216
+
217
+ self._source = source
218
+
193
219
  @property
194
220
  def api_standard(self) -> 'str':
195
221
  """Gets the api_standard of this DeploymentsIdBody. # noqa: E501
@@ -46,7 +46,8 @@ class IdCodeconfigBody(object):
46
46
  'disable_auto_shutdown': 'bool',
47
47
  'ide': 'str',
48
48
  'idle_shutdown_seconds': 'int',
49
- 'port_plugin_port': 'str'
49
+ 'port_plugin_port': 'str',
50
+ 'switch_to_default_machine_on_idle': 'bool'
50
51
  }
51
52
 
52
53
  attribute_map = {
@@ -55,10 +56,11 @@ class IdCodeconfigBody(object):
55
56
  'disable_auto_shutdown': 'disableAutoShutdown',
56
57
  'ide': 'ide',
57
58
  'idle_shutdown_seconds': 'idleShutdownSeconds',
58
- 'port_plugin_port': 'portPluginPort'
59
+ 'port_plugin_port': 'portPluginPort',
60
+ 'switch_to_default_machine_on_idle': 'switchToDefaultMachineOnIdle'
59
61
  }
60
62
 
61
- def __init__(self, compute_config: 'V1UserRequestedComputeConfig' =None, data_connection_mounts: 'list[V1DataConnectionMount]' =None, disable_auto_shutdown: 'bool' =None, ide: 'str' =None, idle_shutdown_seconds: 'int' =None, port_plugin_port: 'str' =None): # noqa: E501
63
+ def __init__(self, compute_config: 'V1UserRequestedComputeConfig' =None, data_connection_mounts: 'list[V1DataConnectionMount]' =None, disable_auto_shutdown: 'bool' =None, ide: 'str' =None, idle_shutdown_seconds: 'int' =None, port_plugin_port: 'str' =None, switch_to_default_machine_on_idle: 'bool' =None): # noqa: E501
62
64
  """IdCodeconfigBody - a model defined in Swagger""" # noqa: E501
63
65
  self._compute_config = None
64
66
  self._data_connection_mounts = None
@@ -66,6 +68,7 @@ class IdCodeconfigBody(object):
66
68
  self._ide = None
67
69
  self._idle_shutdown_seconds = None
68
70
  self._port_plugin_port = None
71
+ self._switch_to_default_machine_on_idle = None
69
72
  self.discriminator = None
70
73
  if compute_config is not None:
71
74
  self.compute_config = compute_config
@@ -79,6 +82,8 @@ class IdCodeconfigBody(object):
79
82
  self.idle_shutdown_seconds = idle_shutdown_seconds
80
83
  if port_plugin_port is not None:
81
84
  self.port_plugin_port = port_plugin_port
85
+ if switch_to_default_machine_on_idle is not None:
86
+ self.switch_to_default_machine_on_idle = switch_to_default_machine_on_idle
82
87
 
83
88
  @property
84
89
  def compute_config(self) -> 'V1UserRequestedComputeConfig':
@@ -206,6 +211,27 @@ class IdCodeconfigBody(object):
206
211
 
207
212
  self._port_plugin_port = port_plugin_port
208
213
 
214
+ @property
215
+ def switch_to_default_machine_on_idle(self) -> 'bool':
216
+ """Gets the switch_to_default_machine_on_idle of this IdCodeconfigBody. # noqa: E501
217
+
218
+
219
+ :return: The switch_to_default_machine_on_idle of this IdCodeconfigBody. # noqa: E501
220
+ :rtype: bool
221
+ """
222
+ return self._switch_to_default_machine_on_idle
223
+
224
+ @switch_to_default_machine_on_idle.setter
225
+ def switch_to_default_machine_on_idle(self, switch_to_default_machine_on_idle: 'bool'):
226
+ """Sets the switch_to_default_machine_on_idle of this IdCodeconfigBody.
227
+
228
+
229
+ :param switch_to_default_machine_on_idle: The switch_to_default_machine_on_idle of this IdCodeconfigBody. # noqa: E501
230
+ :type: bool
231
+ """
232
+
233
+ self._switch_to_default_machine_on_idle = switch_to_default_machine_on_idle
234
+
209
235
  def to_dict(self) -> dict:
210
236
  """Returns the model properties as a dict"""
211
237
  result = {}
@@ -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 IdTransferBody(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
+ 'target_cluster_id': 'str'
45
+ }
46
+
47
+ attribute_map = {
48
+ 'target_cluster_id': 'targetClusterId'
49
+ }
50
+
51
+ def __init__(self, target_cluster_id: 'str' =None): # noqa: E501
52
+ """IdTransferBody - a model defined in Swagger""" # noqa: E501
53
+ self._target_cluster_id = None
54
+ self.discriminator = None
55
+ if target_cluster_id is not None:
56
+ self.target_cluster_id = target_cluster_id
57
+
58
+ @property
59
+ def target_cluster_id(self) -> 'str':
60
+ """Gets the target_cluster_id of this IdTransferBody. # noqa: E501
61
+
62
+
63
+ :return: The target_cluster_id of this IdTransferBody. # noqa: E501
64
+ :rtype: str
65
+ """
66
+ return self._target_cluster_id
67
+
68
+ @target_cluster_id.setter
69
+ def target_cluster_id(self, target_cluster_id: 'str'):
70
+ """Sets the target_cluster_id of this IdTransferBody.
71
+
72
+
73
+ :param target_cluster_id: The target_cluster_id of this IdTransferBody. # noqa: E501
74
+ :type: str
75
+ """
76
+
77
+ self._target_cluster_id = target_cluster_id
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(IdTransferBody, 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: 'IdTransferBody') -> bool:
115
+ """Returns true if both objects are equal"""
116
+ if not isinstance(other, IdTransferBody):
117
+ return False
118
+
119
+ return self.__dict__ == other.__dict__
120
+
121
+ def __ne__(self, other: 'IdTransferBody') -> bool:
122
+ """Returns true if both objects are not equal"""
123
+ return not self == other