lightning-sdk 2025.12.16__py3-none-any.whl → 2026.1.22__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/__version__.py +1 -1
- lightning_sdk/api/k8s_api.py +75 -29
- lightning_sdk/api/org_api.py +7 -0
- lightning_sdk/api/studio_api.py +223 -36
- lightning_sdk/api/teamspace_api.py +28 -9
- lightning_sdk/api/user_api.py +5 -0
- lightning_sdk/cli/cp/__init__.py +64 -0
- lightning_sdk/cli/entrypoint.py +2 -0
- lightning_sdk/cli/groups.py +22 -0
- lightning_sdk/cli/legacy/clusters_menu.py +2 -2
- lightning_sdk/cli/legacy/deploy/_auth.py +7 -6
- lightning_sdk/cli/legacy/download.py +2 -1
- lightning_sdk/cli/legacy/run.py +13 -2
- lightning_sdk/cli/legacy/studios_menu.py +8 -1
- lightning_sdk/cli/studio/__init__.py +4 -0
- lightning_sdk/cli/studio/cp.py +20 -64
- lightning_sdk/cli/studio/ls.py +57 -0
- lightning_sdk/cli/studio/rm.py +71 -0
- lightning_sdk/cli/utils/logging.py +2 -1
- lightning_sdk/cli/utils/studio_filesystem.py +65 -0
- lightning_sdk/cli/utils/teamspace_selection.py +5 -0
- lightning_sdk/exceptions.py +4 -0
- lightning_sdk/job/base.py +24 -5
- lightning_sdk/job/job.py +12 -5
- lightning_sdk/job/v1.py +5 -2
- lightning_sdk/job/v2.py +9 -1
- lightning_sdk/k8s_cluster.py +9 -10
- lightning_sdk/lightning_cloud/__version__.py +1 -1
- lightning_sdk/lightning_cloud/openapi/__init__.py +46 -3
- lightning_sdk/lightning_cloud/openapi/api/__init__.py +1 -0
- lightning_sdk/lightning_cloud/openapi/api/cloud_space_service_api.py +118 -1
- lightning_sdk/lightning_cloud/openapi/api/cluster_service_api.py +787 -125
- lightning_sdk/lightning_cloud/openapi/api/data_connection_service_api.py +5 -1
- lightning_sdk/lightning_cloud/openapi/api/file_system_service_api.py +11 -11
- lightning_sdk/lightning_cloud/openapi/api/k8_s_cluster_service_api.py +246 -19
- lightning_sdk/lightning_cloud/openapi/api/lightningwork_service_api.py +116 -11
- lightning_sdk/lightning_cloud/openapi/api/lit_logger_service_api.py +588 -2
- lightning_sdk/lightning_cloud/openapi/api/models_store_api.py +9 -1
- lightning_sdk/lightning_cloud/openapi/api/storage_service_api.py +5 -1
- lightning_sdk/lightning_cloud/openapi/api/virtual_machine_service_api.py +557 -0
- lightning_sdk/lightning_cloud/openapi/models/__init__.py +45 -3
- lightning_sdk/lightning_cloud/openapi/models/cloud_space_environment_template_service_update_cloud_space_environment_template_body.py +27 -1
- lightning_sdk/lightning_cloud/openapi/models/cluster_service_add_container_registry_body.py +123 -0
- lightning_sdk/lightning_cloud/openapi/models/cluster_service_create_cluster_capacity_reservation_body.py +53 -1
- lightning_sdk/lightning_cloud/openapi/models/cluster_service_create_machine_body.py +79 -1
- lightning_sdk/lightning_cloud/openapi/models/cluster_service_create_org_cluster_capacity_reservation_body.py +409 -0
- lightning_sdk/lightning_cloud/openapi/models/cluster_service_refresh_container_registry_credentials_body.py +97 -0
- lightning_sdk/lightning_cloud/openapi/models/cluster_service_report_machine_system_metrics_body.py +123 -0
- lightning_sdk/lightning_cloud/openapi/models/cluster_service_validate_container_registry_body.py +97 -0
- lightning_sdk/lightning_cloud/openapi/models/externalv1_cloud_space_instance_status.py +27 -1
- lightning_sdk/lightning_cloud/openapi/models/lit_logger_service_create_lit_logger_media_body.py +305 -0
- lightning_sdk/lightning_cloud/openapi/models/lit_logger_service_update_lit_logger_media_body.py +149 -0
- lightning_sdk/lightning_cloud/openapi/models/lit_logger_service_update_metrics_stream_body.py +53 -1
- lightning_sdk/lightning_cloud/openapi/models/v1_add_container_registry_response.py +123 -0
- lightning_sdk/lightning_cloud/openapi/models/v1_capacity_reservation_used_by.py +227 -0
- lightning_sdk/lightning_cloud/openapi/models/v1_cloud_provider.py +1 -1
- lightning_sdk/lightning_cloud/openapi/models/v1_cloud_space_environment_template_config.py +27 -1
- lightning_sdk/lightning_cloud/openapi/models/v1_cloud_space_environment_type.py +1 -0
- lightning_sdk/lightning_cloud/openapi/models/v1_cloud_space_specialized_view.py +1 -0
- lightning_sdk/lightning_cloud/openapi/models/v1_cluster_accelerator.py +27 -1
- lightning_sdk/lightning_cloud/openapi/models/v1_cluster_capacity_reservation.py +27 -1
- lightning_sdk/lightning_cloud/openapi/models/v1_cluster_spec.py +53 -27
- lightning_sdk/lightning_cloud/openapi/models/v1_cluster_type.py +0 -1
- lightning_sdk/lightning_cloud/openapi/models/v1_container_registry.py +253 -0
- lightning_sdk/lightning_cloud/openapi/models/v1_container_registry_info.py +281 -0
- lightning_sdk/lightning_cloud/openapi/models/v1_container_registry_integration.py +123 -0
- lightning_sdk/lightning_cloud/openapi/models/v1_container_registry_status.py +105 -0
- lightning_sdk/lightning_cloud/openapi/models/v1_create_cloud_space_environment_template_request.py +27 -1
- lightning_sdk/lightning_cloud/openapi/models/v1_create_lit_logger_media_response.py +149 -0
- lightning_sdk/lightning_cloud/openapi/models/v1_create_org_cluster_capacity_reservation_response.py +201 -0
- lightning_sdk/lightning_cloud/openapi/models/v1_create_sdk_command_history_request.py +29 -3
- lightning_sdk/lightning_cloud/openapi/models/v1_cudo_direct_v1.py +175 -0
- lightning_sdk/lightning_cloud/openapi/models/v1_delete_container_registry_response.py +97 -0
- lightning_sdk/lightning_cloud/openapi/models/v1_delete_lit_logger_media_response.py +97 -0
- lightning_sdk/lightning_cloud/openapi/models/v1_delete_virtual_machine_response.py +97 -0
- lightning_sdk/lightning_cloud/openapi/models/{v1_ai_pod_v1.py → v1_ecr_registry_config.py} +49 -49
- lightning_sdk/lightning_cloud/openapi/models/v1_ecr_registry_config_input.py +123 -0
- lightning_sdk/lightning_cloud/openapi/models/v1_ecr_registry_details.py +201 -0
- lightning_sdk/lightning_cloud/openapi/models/v1_external_cluster_spec.py +27 -27
- lightning_sdk/lightning_cloud/openapi/models/v1_external_search_user.py +27 -1
- lightning_sdk/lightning_cloud/openapi/models/v1_get_artifacts_page_response.py +29 -3
- lightning_sdk/lightning_cloud/openapi/models/v1_get_kubernetes_pod_logs_response.py +149 -0
- lightning_sdk/lightning_cloud/openapi/models/{v1_get_machine_response.py → v1_get_kubernetes_pod_response.py} +23 -23
- lightning_sdk/lightning_cloud/openapi/models/v1_get_user_response.py +27 -1
- lightning_sdk/lightning_cloud/openapi/models/v1_job_spec.py +27 -1
- lightning_sdk/lightning_cloud/openapi/models/v1_joinable_organization.py +27 -1
- lightning_sdk/lightning_cloud/openapi/models/v1_k8s_incident_setting.py +149 -0
- lightning_sdk/lightning_cloud/openapi/models/v1_k8s_incident_type.py +108 -0
- lightning_sdk/lightning_cloud/openapi/models/v1_kubernetes_direct_settings_v1.py +53 -1
- lightning_sdk/lightning_cloud/openapi/models/v1_kubernetes_direct_v1.py +105 -1
- lightning_sdk/lightning_cloud/openapi/models/v1_kubernetes_pod.py +27 -1
- lightning_sdk/lightning_cloud/openapi/models/v1_kubernetes_pod_logs_page.py +227 -0
- lightning_sdk/lightning_cloud/openapi/models/v1_kubevirt_config.py +357 -0
- lightning_sdk/lightning_cloud/openapi/models/v1_list_container_registries_response.py +123 -0
- lightning_sdk/lightning_cloud/openapi/models/v1_list_kubernetes_pods_response.py +43 -17
- lightning_sdk/lightning_cloud/openapi/models/v1_list_kubernetes_pods_sort_order.py +104 -0
- lightning_sdk/lightning_cloud/openapi/models/v1_list_lit_logger_media_response.py +149 -0
- lightning_sdk/lightning_cloud/openapi/models/v1_list_models_response.py +55 -3
- lightning_sdk/lightning_cloud/openapi/models/v1_list_virtual_machines_response.py +123 -0
- lightning_sdk/lightning_cloud/openapi/models/v1_lit_logger_media.py +513 -0
- lightning_sdk/lightning_cloud/openapi/models/v1_machine.py +53 -53
- lightning_sdk/lightning_cloud/openapi/models/v1_machine_direct_v1.py +107 -3
- lightning_sdk/lightning_cloud/openapi/models/v1_media_type.py +104 -0
- lightning_sdk/lightning_cloud/openapi/models/v1_nebius_direct_v1.py +29 -3
- lightning_sdk/lightning_cloud/openapi/models/v1_node_metrics.py +27 -1
- lightning_sdk/lightning_cloud/openapi/models/v1_organization.py +27 -1
- lightning_sdk/lightning_cloud/openapi/models/v1_refresh_container_registry_credentials_response.py +123 -0
- lightning_sdk/lightning_cloud/openapi/models/v1_report_cloud_space_instance_idle_state_response.py +97 -0
- lightning_sdk/lightning_cloud/openapi/models/v1_report_machine_system_metrics_response.py +97 -0
- lightning_sdk/lightning_cloud/openapi/models/v1_search_user.py +27 -1
- lightning_sdk/lightning_cloud/openapi/models/v1_tenant_credentials.py +201 -0
- lightning_sdk/lightning_cloud/openapi/models/v1_user_features.py +217 -113
- lightning_sdk/lightning_cloud/openapi/models/v1_validate_container_registry_response.py +149 -0
- lightning_sdk/lightning_cloud/openapi/models/v1_virtual_machine.py +409 -0
- lightning_sdk/lightning_cloud/openapi/models/v1_vm_configuration.py +149 -0
- lightning_sdk/lightning_cloud/openapi/models/v1_vm_provider_configuration.py +227 -0
- lightning_sdk/lightning_cloud/openapi/models/virtual_machine_service_create_virtual_machine_body.py +565 -0
- lightning_sdk/lightning_cloud/openapi/models/virtual_machine_service_update_virtual_machine_body.py +97 -0
- lightning_sdk/lightning_cloud/openapi/rest.py +2 -2
- lightning_sdk/lightning_cloud/rest_client.py +0 -2
- lightning_sdk/machine.py +3 -3
- lightning_sdk/mmt/base.py +26 -7
- lightning_sdk/mmt/mmt.py +11 -6
- lightning_sdk/mmt/v1.py +5 -2
- lightning_sdk/mmt/v2.py +5 -2
- lightning_sdk/organization.py +10 -1
- lightning_sdk/owner.py +4 -0
- lightning_sdk/plugin.py +2 -2
- lightning_sdk/studio.py +47 -6
- lightning_sdk/user.py +22 -2
- lightning_sdk/utils/logging.py +2 -1
- lightning_sdk/utils/resolve.py +9 -7
- {lightning_sdk-2025.12.16.dist-info → lightning_sdk-2026.1.22.dist-info}/METADATA +1 -5
- {lightning_sdk-2025.12.16.dist-info → lightning_sdk-2026.1.22.dist-info}/RECORD +139 -94
- {lightning_sdk-2025.12.16.dist-info → lightning_sdk-2026.1.22.dist-info}/WHEEL +1 -1
- lightning_sdk/lightning_cloud/cli/__main__.py +0 -29
- lightning_sdk/lightning_cloud/source_code/logs_socket_api.py +0 -103
- /lightning_sdk/lightning_cloud/openapi/models/{v1_list_filesystem_mm_ts_response.py → v1_list_filesystem_mmts_response.py} +0 -0
- {lightning_sdk-2025.12.16.dist-info → lightning_sdk-2026.1.22.dist-info}/LICENSE +0 -0
- {lightning_sdk-2025.12.16.dist-info → lightning_sdk-2026.1.22.dist-info}/entry_points.txt +0 -0
- {lightning_sdk-2025.12.16.dist-info → lightning_sdk-2026.1.22.dist-info}/top_level.txt +0 -0
|
@@ -42,16 +42,19 @@ class ClusterServiceCreateMachineBody(object):
|
|
|
42
42
|
"""
|
|
43
43
|
swagger_types = {
|
|
44
44
|
'address': 'str',
|
|
45
|
+
'ca_cert': 'str',
|
|
45
46
|
'instance_type': 'str',
|
|
46
47
|
'management_api_url': 'str',
|
|
47
48
|
'name': 'str',
|
|
48
49
|
'org_id': 'str',
|
|
49
50
|
'parent_cluster_id': 'str',
|
|
51
|
+
'private_address': 'str',
|
|
50
52
|
'provider': 'str',
|
|
51
53
|
'provider_instance_id': 'str',
|
|
52
54
|
'provider_region': 'str',
|
|
53
55
|
'provisioning_method': 'str',
|
|
54
56
|
'resources': 'V1Resources',
|
|
57
|
+
'ssh_username': 'str',
|
|
55
58
|
'tls_cert': 'str',
|
|
56
59
|
'tls_key': 'str',
|
|
57
60
|
'unschedulable': 'bool'
|
|
@@ -59,40 +62,48 @@ class ClusterServiceCreateMachineBody(object):
|
|
|
59
62
|
|
|
60
63
|
attribute_map = {
|
|
61
64
|
'address': 'address',
|
|
65
|
+
'ca_cert': 'caCert',
|
|
62
66
|
'instance_type': 'instanceType',
|
|
63
67
|
'management_api_url': 'managementApiUrl',
|
|
64
68
|
'name': 'name',
|
|
65
69
|
'org_id': 'orgId',
|
|
66
70
|
'parent_cluster_id': 'parentClusterId',
|
|
71
|
+
'private_address': 'privateAddress',
|
|
67
72
|
'provider': 'provider',
|
|
68
73
|
'provider_instance_id': 'providerInstanceId',
|
|
69
74
|
'provider_region': 'providerRegion',
|
|
70
75
|
'provisioning_method': 'provisioningMethod',
|
|
71
76
|
'resources': 'resources',
|
|
77
|
+
'ssh_username': 'sshUsername',
|
|
72
78
|
'tls_cert': 'tlsCert',
|
|
73
79
|
'tls_key': 'tlsKey',
|
|
74
80
|
'unschedulable': 'unschedulable'
|
|
75
81
|
}
|
|
76
82
|
|
|
77
|
-
def __init__(self, address: 'str' =None, instance_type: 'str' =None, management_api_url: 'str' =None, name: 'str' =None, org_id: 'str' =None, parent_cluster_id: 'str' =None, provider: 'str' =None, provider_instance_id: 'str' =None, provider_region: 'str' =None, provisioning_method: 'str' =None, resources: 'V1Resources' =None, tls_cert: 'str' =None, tls_key: 'str' =None, unschedulable: 'bool' =None): # noqa: E501
|
|
83
|
+
def __init__(self, address: 'str' =None, ca_cert: 'str' =None, instance_type: 'str' =None, management_api_url: 'str' =None, name: 'str' =None, org_id: 'str' =None, parent_cluster_id: 'str' =None, private_address: 'str' =None, provider: 'str' =None, provider_instance_id: 'str' =None, provider_region: 'str' =None, provisioning_method: 'str' =None, resources: 'V1Resources' =None, ssh_username: 'str' =None, tls_cert: 'str' =None, tls_key: 'str' =None, unschedulable: 'bool' =None): # noqa: E501
|
|
78
84
|
"""ClusterServiceCreateMachineBody - a model defined in Swagger""" # noqa: E501
|
|
79
85
|
self._address = None
|
|
86
|
+
self._ca_cert = None
|
|
80
87
|
self._instance_type = None
|
|
81
88
|
self._management_api_url = None
|
|
82
89
|
self._name = None
|
|
83
90
|
self._org_id = None
|
|
84
91
|
self._parent_cluster_id = None
|
|
92
|
+
self._private_address = None
|
|
85
93
|
self._provider = None
|
|
86
94
|
self._provider_instance_id = None
|
|
87
95
|
self._provider_region = None
|
|
88
96
|
self._provisioning_method = None
|
|
89
97
|
self._resources = None
|
|
98
|
+
self._ssh_username = None
|
|
90
99
|
self._tls_cert = None
|
|
91
100
|
self._tls_key = None
|
|
92
101
|
self._unschedulable = None
|
|
93
102
|
self.discriminator = None
|
|
94
103
|
if address is not None:
|
|
95
104
|
self.address = address
|
|
105
|
+
if ca_cert is not None:
|
|
106
|
+
self.ca_cert = ca_cert
|
|
96
107
|
if instance_type is not None:
|
|
97
108
|
self.instance_type = instance_type
|
|
98
109
|
if management_api_url is not None:
|
|
@@ -103,6 +114,8 @@ class ClusterServiceCreateMachineBody(object):
|
|
|
103
114
|
self.org_id = org_id
|
|
104
115
|
if parent_cluster_id is not None:
|
|
105
116
|
self.parent_cluster_id = parent_cluster_id
|
|
117
|
+
if private_address is not None:
|
|
118
|
+
self.private_address = private_address
|
|
106
119
|
if provider is not None:
|
|
107
120
|
self.provider = provider
|
|
108
121
|
if provider_instance_id is not None:
|
|
@@ -113,6 +126,8 @@ class ClusterServiceCreateMachineBody(object):
|
|
|
113
126
|
self.provisioning_method = provisioning_method
|
|
114
127
|
if resources is not None:
|
|
115
128
|
self.resources = resources
|
|
129
|
+
if ssh_username is not None:
|
|
130
|
+
self.ssh_username = ssh_username
|
|
116
131
|
if tls_cert is not None:
|
|
117
132
|
self.tls_cert = tls_cert
|
|
118
133
|
if tls_key is not None:
|
|
@@ -141,6 +156,27 @@ class ClusterServiceCreateMachineBody(object):
|
|
|
141
156
|
|
|
142
157
|
self._address = address
|
|
143
158
|
|
|
159
|
+
@property
|
|
160
|
+
def ca_cert(self) -> 'str':
|
|
161
|
+
"""Gets the ca_cert of this ClusterServiceCreateMachineBody. # noqa: E501
|
|
162
|
+
|
|
163
|
+
|
|
164
|
+
:return: The ca_cert of this ClusterServiceCreateMachineBody. # noqa: E501
|
|
165
|
+
:rtype: str
|
|
166
|
+
"""
|
|
167
|
+
return self._ca_cert
|
|
168
|
+
|
|
169
|
+
@ca_cert.setter
|
|
170
|
+
def ca_cert(self, ca_cert: 'str'):
|
|
171
|
+
"""Sets the ca_cert of this ClusterServiceCreateMachineBody.
|
|
172
|
+
|
|
173
|
+
|
|
174
|
+
:param ca_cert: The ca_cert of this ClusterServiceCreateMachineBody. # noqa: E501
|
|
175
|
+
:type: str
|
|
176
|
+
"""
|
|
177
|
+
|
|
178
|
+
self._ca_cert = ca_cert
|
|
179
|
+
|
|
144
180
|
@property
|
|
145
181
|
def instance_type(self) -> 'str':
|
|
146
182
|
"""Gets the instance_type of this ClusterServiceCreateMachineBody. # noqa: E501
|
|
@@ -246,6 +282,27 @@ class ClusterServiceCreateMachineBody(object):
|
|
|
246
282
|
|
|
247
283
|
self._parent_cluster_id = parent_cluster_id
|
|
248
284
|
|
|
285
|
+
@property
|
|
286
|
+
def private_address(self) -> 'str':
|
|
287
|
+
"""Gets the private_address of this ClusterServiceCreateMachineBody. # noqa: E501
|
|
288
|
+
|
|
289
|
+
|
|
290
|
+
:return: The private_address of this ClusterServiceCreateMachineBody. # noqa: E501
|
|
291
|
+
:rtype: str
|
|
292
|
+
"""
|
|
293
|
+
return self._private_address
|
|
294
|
+
|
|
295
|
+
@private_address.setter
|
|
296
|
+
def private_address(self, private_address: 'str'):
|
|
297
|
+
"""Sets the private_address of this ClusterServiceCreateMachineBody.
|
|
298
|
+
|
|
299
|
+
|
|
300
|
+
:param private_address: The private_address of this ClusterServiceCreateMachineBody. # noqa: E501
|
|
301
|
+
:type: str
|
|
302
|
+
"""
|
|
303
|
+
|
|
304
|
+
self._private_address = private_address
|
|
305
|
+
|
|
249
306
|
@property
|
|
250
307
|
def provider(self) -> 'str':
|
|
251
308
|
"""Gets the provider of this ClusterServiceCreateMachineBody. # noqa: E501
|
|
@@ -351,6 +408,27 @@ class ClusterServiceCreateMachineBody(object):
|
|
|
351
408
|
|
|
352
409
|
self._resources = resources
|
|
353
410
|
|
|
411
|
+
@property
|
|
412
|
+
def ssh_username(self) -> 'str':
|
|
413
|
+
"""Gets the ssh_username of this ClusterServiceCreateMachineBody. # noqa: E501
|
|
414
|
+
|
|
415
|
+
|
|
416
|
+
:return: The ssh_username of this ClusterServiceCreateMachineBody. # noqa: E501
|
|
417
|
+
:rtype: str
|
|
418
|
+
"""
|
|
419
|
+
return self._ssh_username
|
|
420
|
+
|
|
421
|
+
@ssh_username.setter
|
|
422
|
+
def ssh_username(self, ssh_username: 'str'):
|
|
423
|
+
"""Sets the ssh_username of this ClusterServiceCreateMachineBody.
|
|
424
|
+
|
|
425
|
+
|
|
426
|
+
:param ssh_username: The ssh_username of this ClusterServiceCreateMachineBody. # noqa: E501
|
|
427
|
+
:type: str
|
|
428
|
+
"""
|
|
429
|
+
|
|
430
|
+
self._ssh_username = ssh_username
|
|
431
|
+
|
|
354
432
|
@property
|
|
355
433
|
def tls_cert(self) -> 'str':
|
|
356
434
|
"""Gets the tls_cert of this ClusterServiceCreateMachineBody. # noqa: E501
|
|
@@ -0,0 +1,409 @@
|
|
|
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 ClusterServiceCreateOrgClusterCapacityReservationBody(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
|
+
'capacity_reservation_type': 'str',
|
|
45
|
+
'cloud_provider_capacity_reservation_id': 'str',
|
|
46
|
+
'end_time': 'datetime',
|
|
47
|
+
'full_cloud_provider_reservation_string': 'str',
|
|
48
|
+
'instance_type': 'str',
|
|
49
|
+
'match_pattern': 'str',
|
|
50
|
+
'num_instances': 'int',
|
|
51
|
+
'populate_from_cloud_provider': 'bool',
|
|
52
|
+
'project_id': 'str',
|
|
53
|
+
'region': 'str',
|
|
54
|
+
'start_time': 'datetime',
|
|
55
|
+
'zone': 'str'
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
attribute_map = {
|
|
59
|
+
'capacity_reservation_type': 'capacityReservationType',
|
|
60
|
+
'cloud_provider_capacity_reservation_id': 'cloudProviderCapacityReservationId',
|
|
61
|
+
'end_time': 'endTime',
|
|
62
|
+
'full_cloud_provider_reservation_string': 'fullCloudProviderReservationString',
|
|
63
|
+
'instance_type': 'instanceType',
|
|
64
|
+
'match_pattern': 'matchPattern',
|
|
65
|
+
'num_instances': 'numInstances',
|
|
66
|
+
'populate_from_cloud_provider': 'populateFromCloudProvider',
|
|
67
|
+
'project_id': 'projectId',
|
|
68
|
+
'region': 'region',
|
|
69
|
+
'start_time': 'startTime',
|
|
70
|
+
'zone': 'zone'
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
def __init__(self, capacity_reservation_type: 'str' =None, cloud_provider_capacity_reservation_id: 'str' =None, end_time: 'datetime' =None, full_cloud_provider_reservation_string: 'str' =None, instance_type: 'str' =None, match_pattern: 'str' =None, num_instances: 'int' =None, populate_from_cloud_provider: 'bool' =None, project_id: 'str' =None, region: 'str' =None, start_time: 'datetime' =None, zone: 'str' =None): # noqa: E501
|
|
74
|
+
"""ClusterServiceCreateOrgClusterCapacityReservationBody - a model defined in Swagger""" # noqa: E501
|
|
75
|
+
self._capacity_reservation_type = None
|
|
76
|
+
self._cloud_provider_capacity_reservation_id = None
|
|
77
|
+
self._end_time = None
|
|
78
|
+
self._full_cloud_provider_reservation_string = None
|
|
79
|
+
self._instance_type = None
|
|
80
|
+
self._match_pattern = None
|
|
81
|
+
self._num_instances = None
|
|
82
|
+
self._populate_from_cloud_provider = None
|
|
83
|
+
self._project_id = None
|
|
84
|
+
self._region = None
|
|
85
|
+
self._start_time = None
|
|
86
|
+
self._zone = None
|
|
87
|
+
self.discriminator = None
|
|
88
|
+
if capacity_reservation_type is not None:
|
|
89
|
+
self.capacity_reservation_type = capacity_reservation_type
|
|
90
|
+
if cloud_provider_capacity_reservation_id is not None:
|
|
91
|
+
self.cloud_provider_capacity_reservation_id = cloud_provider_capacity_reservation_id
|
|
92
|
+
if end_time is not None:
|
|
93
|
+
self.end_time = end_time
|
|
94
|
+
if full_cloud_provider_reservation_string is not None:
|
|
95
|
+
self.full_cloud_provider_reservation_string = full_cloud_provider_reservation_string
|
|
96
|
+
if instance_type is not None:
|
|
97
|
+
self.instance_type = instance_type
|
|
98
|
+
if match_pattern is not None:
|
|
99
|
+
self.match_pattern = match_pattern
|
|
100
|
+
if num_instances is not None:
|
|
101
|
+
self.num_instances = num_instances
|
|
102
|
+
if populate_from_cloud_provider is not None:
|
|
103
|
+
self.populate_from_cloud_provider = populate_from_cloud_provider
|
|
104
|
+
if project_id is not None:
|
|
105
|
+
self.project_id = project_id
|
|
106
|
+
if region is not None:
|
|
107
|
+
self.region = region
|
|
108
|
+
if start_time is not None:
|
|
109
|
+
self.start_time = start_time
|
|
110
|
+
if zone is not None:
|
|
111
|
+
self.zone = zone
|
|
112
|
+
|
|
113
|
+
@property
|
|
114
|
+
def capacity_reservation_type(self) -> 'str':
|
|
115
|
+
"""Gets the capacity_reservation_type of this ClusterServiceCreateOrgClusterCapacityReservationBody. # noqa: E501
|
|
116
|
+
|
|
117
|
+
|
|
118
|
+
:return: The capacity_reservation_type of this ClusterServiceCreateOrgClusterCapacityReservationBody. # noqa: E501
|
|
119
|
+
:rtype: str
|
|
120
|
+
"""
|
|
121
|
+
return self._capacity_reservation_type
|
|
122
|
+
|
|
123
|
+
@capacity_reservation_type.setter
|
|
124
|
+
def capacity_reservation_type(self, capacity_reservation_type: 'str'):
|
|
125
|
+
"""Sets the capacity_reservation_type of this ClusterServiceCreateOrgClusterCapacityReservationBody.
|
|
126
|
+
|
|
127
|
+
|
|
128
|
+
:param capacity_reservation_type: The capacity_reservation_type of this ClusterServiceCreateOrgClusterCapacityReservationBody. # noqa: E501
|
|
129
|
+
:type: str
|
|
130
|
+
"""
|
|
131
|
+
|
|
132
|
+
self._capacity_reservation_type = capacity_reservation_type
|
|
133
|
+
|
|
134
|
+
@property
|
|
135
|
+
def cloud_provider_capacity_reservation_id(self) -> 'str':
|
|
136
|
+
"""Gets the cloud_provider_capacity_reservation_id of this ClusterServiceCreateOrgClusterCapacityReservationBody. # noqa: E501
|
|
137
|
+
|
|
138
|
+
|
|
139
|
+
:return: The cloud_provider_capacity_reservation_id of this ClusterServiceCreateOrgClusterCapacityReservationBody. # noqa: E501
|
|
140
|
+
:rtype: str
|
|
141
|
+
"""
|
|
142
|
+
return self._cloud_provider_capacity_reservation_id
|
|
143
|
+
|
|
144
|
+
@cloud_provider_capacity_reservation_id.setter
|
|
145
|
+
def cloud_provider_capacity_reservation_id(self, cloud_provider_capacity_reservation_id: 'str'):
|
|
146
|
+
"""Sets the cloud_provider_capacity_reservation_id of this ClusterServiceCreateOrgClusterCapacityReservationBody.
|
|
147
|
+
|
|
148
|
+
|
|
149
|
+
:param cloud_provider_capacity_reservation_id: The cloud_provider_capacity_reservation_id of this ClusterServiceCreateOrgClusterCapacityReservationBody. # noqa: E501
|
|
150
|
+
:type: str
|
|
151
|
+
"""
|
|
152
|
+
|
|
153
|
+
self._cloud_provider_capacity_reservation_id = cloud_provider_capacity_reservation_id
|
|
154
|
+
|
|
155
|
+
@property
|
|
156
|
+
def end_time(self) -> 'datetime':
|
|
157
|
+
"""Gets the end_time of this ClusterServiceCreateOrgClusterCapacityReservationBody. # noqa: E501
|
|
158
|
+
|
|
159
|
+
|
|
160
|
+
:return: The end_time of this ClusterServiceCreateOrgClusterCapacityReservationBody. # noqa: E501
|
|
161
|
+
:rtype: datetime
|
|
162
|
+
"""
|
|
163
|
+
return self._end_time
|
|
164
|
+
|
|
165
|
+
@end_time.setter
|
|
166
|
+
def end_time(self, end_time: 'datetime'):
|
|
167
|
+
"""Sets the end_time of this ClusterServiceCreateOrgClusterCapacityReservationBody.
|
|
168
|
+
|
|
169
|
+
|
|
170
|
+
:param end_time: The end_time of this ClusterServiceCreateOrgClusterCapacityReservationBody. # noqa: E501
|
|
171
|
+
:type: datetime
|
|
172
|
+
"""
|
|
173
|
+
|
|
174
|
+
self._end_time = end_time
|
|
175
|
+
|
|
176
|
+
@property
|
|
177
|
+
def full_cloud_provider_reservation_string(self) -> 'str':
|
|
178
|
+
"""Gets the full_cloud_provider_reservation_string of this ClusterServiceCreateOrgClusterCapacityReservationBody. # noqa: E501
|
|
179
|
+
|
|
180
|
+
|
|
181
|
+
:return: The full_cloud_provider_reservation_string of this ClusterServiceCreateOrgClusterCapacityReservationBody. # noqa: E501
|
|
182
|
+
:rtype: str
|
|
183
|
+
"""
|
|
184
|
+
return self._full_cloud_provider_reservation_string
|
|
185
|
+
|
|
186
|
+
@full_cloud_provider_reservation_string.setter
|
|
187
|
+
def full_cloud_provider_reservation_string(self, full_cloud_provider_reservation_string: 'str'):
|
|
188
|
+
"""Sets the full_cloud_provider_reservation_string of this ClusterServiceCreateOrgClusterCapacityReservationBody.
|
|
189
|
+
|
|
190
|
+
|
|
191
|
+
:param full_cloud_provider_reservation_string: The full_cloud_provider_reservation_string of this ClusterServiceCreateOrgClusterCapacityReservationBody. # noqa: E501
|
|
192
|
+
:type: str
|
|
193
|
+
"""
|
|
194
|
+
|
|
195
|
+
self._full_cloud_provider_reservation_string = full_cloud_provider_reservation_string
|
|
196
|
+
|
|
197
|
+
@property
|
|
198
|
+
def instance_type(self) -> 'str':
|
|
199
|
+
"""Gets the instance_type of this ClusterServiceCreateOrgClusterCapacityReservationBody. # noqa: E501
|
|
200
|
+
|
|
201
|
+
|
|
202
|
+
:return: The instance_type of this ClusterServiceCreateOrgClusterCapacityReservationBody. # noqa: E501
|
|
203
|
+
:rtype: str
|
|
204
|
+
"""
|
|
205
|
+
return self._instance_type
|
|
206
|
+
|
|
207
|
+
@instance_type.setter
|
|
208
|
+
def instance_type(self, instance_type: 'str'):
|
|
209
|
+
"""Sets the instance_type of this ClusterServiceCreateOrgClusterCapacityReservationBody.
|
|
210
|
+
|
|
211
|
+
|
|
212
|
+
:param instance_type: The instance_type of this ClusterServiceCreateOrgClusterCapacityReservationBody. # noqa: E501
|
|
213
|
+
:type: str
|
|
214
|
+
"""
|
|
215
|
+
|
|
216
|
+
self._instance_type = instance_type
|
|
217
|
+
|
|
218
|
+
@property
|
|
219
|
+
def match_pattern(self) -> 'str':
|
|
220
|
+
"""Gets the match_pattern of this ClusterServiceCreateOrgClusterCapacityReservationBody. # noqa: E501
|
|
221
|
+
|
|
222
|
+
|
|
223
|
+
:return: The match_pattern of this ClusterServiceCreateOrgClusterCapacityReservationBody. # noqa: E501
|
|
224
|
+
:rtype: str
|
|
225
|
+
"""
|
|
226
|
+
return self._match_pattern
|
|
227
|
+
|
|
228
|
+
@match_pattern.setter
|
|
229
|
+
def match_pattern(self, match_pattern: 'str'):
|
|
230
|
+
"""Sets the match_pattern of this ClusterServiceCreateOrgClusterCapacityReservationBody.
|
|
231
|
+
|
|
232
|
+
|
|
233
|
+
:param match_pattern: The match_pattern of this ClusterServiceCreateOrgClusterCapacityReservationBody. # noqa: E501
|
|
234
|
+
:type: str
|
|
235
|
+
"""
|
|
236
|
+
|
|
237
|
+
self._match_pattern = match_pattern
|
|
238
|
+
|
|
239
|
+
@property
|
|
240
|
+
def num_instances(self) -> 'int':
|
|
241
|
+
"""Gets the num_instances of this ClusterServiceCreateOrgClusterCapacityReservationBody. # noqa: E501
|
|
242
|
+
|
|
243
|
+
|
|
244
|
+
:return: The num_instances of this ClusterServiceCreateOrgClusterCapacityReservationBody. # noqa: E501
|
|
245
|
+
:rtype: int
|
|
246
|
+
"""
|
|
247
|
+
return self._num_instances
|
|
248
|
+
|
|
249
|
+
@num_instances.setter
|
|
250
|
+
def num_instances(self, num_instances: 'int'):
|
|
251
|
+
"""Sets the num_instances of this ClusterServiceCreateOrgClusterCapacityReservationBody.
|
|
252
|
+
|
|
253
|
+
|
|
254
|
+
:param num_instances: The num_instances of this ClusterServiceCreateOrgClusterCapacityReservationBody. # noqa: E501
|
|
255
|
+
:type: int
|
|
256
|
+
"""
|
|
257
|
+
|
|
258
|
+
self._num_instances = num_instances
|
|
259
|
+
|
|
260
|
+
@property
|
|
261
|
+
def populate_from_cloud_provider(self) -> 'bool':
|
|
262
|
+
"""Gets the populate_from_cloud_provider of this ClusterServiceCreateOrgClusterCapacityReservationBody. # noqa: E501
|
|
263
|
+
|
|
264
|
+
|
|
265
|
+
:return: The populate_from_cloud_provider of this ClusterServiceCreateOrgClusterCapacityReservationBody. # noqa: E501
|
|
266
|
+
:rtype: bool
|
|
267
|
+
"""
|
|
268
|
+
return self._populate_from_cloud_provider
|
|
269
|
+
|
|
270
|
+
@populate_from_cloud_provider.setter
|
|
271
|
+
def populate_from_cloud_provider(self, populate_from_cloud_provider: 'bool'):
|
|
272
|
+
"""Sets the populate_from_cloud_provider of this ClusterServiceCreateOrgClusterCapacityReservationBody.
|
|
273
|
+
|
|
274
|
+
|
|
275
|
+
:param populate_from_cloud_provider: The populate_from_cloud_provider of this ClusterServiceCreateOrgClusterCapacityReservationBody. # noqa: E501
|
|
276
|
+
:type: bool
|
|
277
|
+
"""
|
|
278
|
+
|
|
279
|
+
self._populate_from_cloud_provider = populate_from_cloud_provider
|
|
280
|
+
|
|
281
|
+
@property
|
|
282
|
+
def project_id(self) -> 'str':
|
|
283
|
+
"""Gets the project_id of this ClusterServiceCreateOrgClusterCapacityReservationBody. # noqa: E501
|
|
284
|
+
|
|
285
|
+
|
|
286
|
+
:return: The project_id of this ClusterServiceCreateOrgClusterCapacityReservationBody. # noqa: E501
|
|
287
|
+
:rtype: str
|
|
288
|
+
"""
|
|
289
|
+
return self._project_id
|
|
290
|
+
|
|
291
|
+
@project_id.setter
|
|
292
|
+
def project_id(self, project_id: 'str'):
|
|
293
|
+
"""Sets the project_id of this ClusterServiceCreateOrgClusterCapacityReservationBody.
|
|
294
|
+
|
|
295
|
+
|
|
296
|
+
:param project_id: The project_id of this ClusterServiceCreateOrgClusterCapacityReservationBody. # noqa: E501
|
|
297
|
+
:type: str
|
|
298
|
+
"""
|
|
299
|
+
|
|
300
|
+
self._project_id = project_id
|
|
301
|
+
|
|
302
|
+
@property
|
|
303
|
+
def region(self) -> 'str':
|
|
304
|
+
"""Gets the region of this ClusterServiceCreateOrgClusterCapacityReservationBody. # noqa: E501
|
|
305
|
+
|
|
306
|
+
|
|
307
|
+
:return: The region of this ClusterServiceCreateOrgClusterCapacityReservationBody. # noqa: E501
|
|
308
|
+
:rtype: str
|
|
309
|
+
"""
|
|
310
|
+
return self._region
|
|
311
|
+
|
|
312
|
+
@region.setter
|
|
313
|
+
def region(self, region: 'str'):
|
|
314
|
+
"""Sets the region of this ClusterServiceCreateOrgClusterCapacityReservationBody.
|
|
315
|
+
|
|
316
|
+
|
|
317
|
+
:param region: The region of this ClusterServiceCreateOrgClusterCapacityReservationBody. # noqa: E501
|
|
318
|
+
:type: str
|
|
319
|
+
"""
|
|
320
|
+
|
|
321
|
+
self._region = region
|
|
322
|
+
|
|
323
|
+
@property
|
|
324
|
+
def start_time(self) -> 'datetime':
|
|
325
|
+
"""Gets the start_time of this ClusterServiceCreateOrgClusterCapacityReservationBody. # noqa: E501
|
|
326
|
+
|
|
327
|
+
|
|
328
|
+
:return: The start_time of this ClusterServiceCreateOrgClusterCapacityReservationBody. # noqa: E501
|
|
329
|
+
:rtype: datetime
|
|
330
|
+
"""
|
|
331
|
+
return self._start_time
|
|
332
|
+
|
|
333
|
+
@start_time.setter
|
|
334
|
+
def start_time(self, start_time: 'datetime'):
|
|
335
|
+
"""Sets the start_time of this ClusterServiceCreateOrgClusterCapacityReservationBody.
|
|
336
|
+
|
|
337
|
+
|
|
338
|
+
:param start_time: The start_time of this ClusterServiceCreateOrgClusterCapacityReservationBody. # noqa: E501
|
|
339
|
+
:type: datetime
|
|
340
|
+
"""
|
|
341
|
+
|
|
342
|
+
self._start_time = start_time
|
|
343
|
+
|
|
344
|
+
@property
|
|
345
|
+
def zone(self) -> 'str':
|
|
346
|
+
"""Gets the zone of this ClusterServiceCreateOrgClusterCapacityReservationBody. # noqa: E501
|
|
347
|
+
|
|
348
|
+
|
|
349
|
+
:return: The zone of this ClusterServiceCreateOrgClusterCapacityReservationBody. # noqa: E501
|
|
350
|
+
:rtype: str
|
|
351
|
+
"""
|
|
352
|
+
return self._zone
|
|
353
|
+
|
|
354
|
+
@zone.setter
|
|
355
|
+
def zone(self, zone: 'str'):
|
|
356
|
+
"""Sets the zone of this ClusterServiceCreateOrgClusterCapacityReservationBody.
|
|
357
|
+
|
|
358
|
+
|
|
359
|
+
:param zone: The zone of this ClusterServiceCreateOrgClusterCapacityReservationBody. # noqa: E501
|
|
360
|
+
:type: str
|
|
361
|
+
"""
|
|
362
|
+
|
|
363
|
+
self._zone = zone
|
|
364
|
+
|
|
365
|
+
def to_dict(self) -> dict:
|
|
366
|
+
"""Returns the model properties as a dict"""
|
|
367
|
+
result = {}
|
|
368
|
+
|
|
369
|
+
for attr, _ in six.iteritems(self.swagger_types):
|
|
370
|
+
value = getattr(self, attr)
|
|
371
|
+
if isinstance(value, list):
|
|
372
|
+
result[attr] = list(map(
|
|
373
|
+
lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
|
|
374
|
+
value
|
|
375
|
+
))
|
|
376
|
+
elif hasattr(value, "to_dict"):
|
|
377
|
+
result[attr] = value.to_dict()
|
|
378
|
+
elif isinstance(value, dict):
|
|
379
|
+
result[attr] = dict(map(
|
|
380
|
+
lambda item: (item[0], item[1].to_dict())
|
|
381
|
+
if hasattr(item[1], "to_dict") else item,
|
|
382
|
+
value.items()
|
|
383
|
+
))
|
|
384
|
+
else:
|
|
385
|
+
result[attr] = value
|
|
386
|
+
if issubclass(ClusterServiceCreateOrgClusterCapacityReservationBody, dict):
|
|
387
|
+
for key, value in self.items():
|
|
388
|
+
result[key] = value
|
|
389
|
+
|
|
390
|
+
return result
|
|
391
|
+
|
|
392
|
+
def to_str(self) -> str:
|
|
393
|
+
"""Returns the string representation of the model"""
|
|
394
|
+
return pprint.pformat(self.to_dict())
|
|
395
|
+
|
|
396
|
+
def __repr__(self) -> str:
|
|
397
|
+
"""For `print` and `pprint`"""
|
|
398
|
+
return self.to_str()
|
|
399
|
+
|
|
400
|
+
def __eq__(self, other: 'ClusterServiceCreateOrgClusterCapacityReservationBody') -> bool:
|
|
401
|
+
"""Returns true if both objects are equal"""
|
|
402
|
+
if not isinstance(other, ClusterServiceCreateOrgClusterCapacityReservationBody):
|
|
403
|
+
return False
|
|
404
|
+
|
|
405
|
+
return self.__dict__ == other.__dict__
|
|
406
|
+
|
|
407
|
+
def __ne__(self, other: 'ClusterServiceCreateOrgClusterCapacityReservationBody') -> bool:
|
|
408
|
+
"""Returns true if both objects are not equal"""
|
|
409
|
+
return not self == other
|
|
@@ -0,0 +1,97 @@
|
|
|
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 ClusterServiceRefreshContainerRegistryCredentialsBody(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
|
+
}
|
|
45
|
+
|
|
46
|
+
attribute_map = {
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
def __init__(self): # noqa: E501
|
|
50
|
+
"""ClusterServiceRefreshContainerRegistryCredentialsBody - a model defined in Swagger""" # noqa: E501
|
|
51
|
+
self.discriminator = None
|
|
52
|
+
|
|
53
|
+
def to_dict(self) -> dict:
|
|
54
|
+
"""Returns the model properties as a dict"""
|
|
55
|
+
result = {}
|
|
56
|
+
|
|
57
|
+
for attr, _ in six.iteritems(self.swagger_types):
|
|
58
|
+
value = getattr(self, attr)
|
|
59
|
+
if isinstance(value, list):
|
|
60
|
+
result[attr] = list(map(
|
|
61
|
+
lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
|
|
62
|
+
value
|
|
63
|
+
))
|
|
64
|
+
elif hasattr(value, "to_dict"):
|
|
65
|
+
result[attr] = value.to_dict()
|
|
66
|
+
elif isinstance(value, dict):
|
|
67
|
+
result[attr] = dict(map(
|
|
68
|
+
lambda item: (item[0], item[1].to_dict())
|
|
69
|
+
if hasattr(item[1], "to_dict") else item,
|
|
70
|
+
value.items()
|
|
71
|
+
))
|
|
72
|
+
else:
|
|
73
|
+
result[attr] = value
|
|
74
|
+
if issubclass(ClusterServiceRefreshContainerRegistryCredentialsBody, dict):
|
|
75
|
+
for key, value in self.items():
|
|
76
|
+
result[key] = value
|
|
77
|
+
|
|
78
|
+
return result
|
|
79
|
+
|
|
80
|
+
def to_str(self) -> str:
|
|
81
|
+
"""Returns the string representation of the model"""
|
|
82
|
+
return pprint.pformat(self.to_dict())
|
|
83
|
+
|
|
84
|
+
def __repr__(self) -> str:
|
|
85
|
+
"""For `print` and `pprint`"""
|
|
86
|
+
return self.to_str()
|
|
87
|
+
|
|
88
|
+
def __eq__(self, other: 'ClusterServiceRefreshContainerRegistryCredentialsBody') -> bool:
|
|
89
|
+
"""Returns true if both objects are equal"""
|
|
90
|
+
if not isinstance(other, ClusterServiceRefreshContainerRegistryCredentialsBody):
|
|
91
|
+
return False
|
|
92
|
+
|
|
93
|
+
return self.__dict__ == other.__dict__
|
|
94
|
+
|
|
95
|
+
def __ne__(self, other: 'ClusterServiceRefreshContainerRegistryCredentialsBody') -> bool:
|
|
96
|
+
"""Returns true if both objects are not equal"""
|
|
97
|
+
return not self == other
|