waldur-api-client 7.7.9__py3-none-any.whl → 7.8.1__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.
Potentially problematic release.
This version of waldur-api-client might be problematic. Click here for more details.
- waldur_api_client/api/marketplace_course_accounts/marketplace_course_accounts_count.py +96 -0
- waldur_api_client/api/marketplace_course_accounts/marketplace_course_accounts_list.py +96 -0
- waldur_api_client/api/marketplace_offering_user_checklist_completions/__init__.py +1 -0
- waldur_api_client/api/marketplace_offering_user_checklist_completions/marketplace_offering_user_checklist_completions_count.py +286 -0
- waldur_api_client/api/marketplace_offering_user_checklist_completions/marketplace_offering_user_checklist_completions_list.py +289 -0
- waldur_api_client/api/{rancher_clusters/rancher_clusters_create.py → marketplace_offering_user_checklist_completions/marketplace_offering_user_checklist_completions_retrieve.py} +29 -38
- waldur_api_client/api/marketplace_offering_users/marketplace_offering_users_count.py +15 -0
- waldur_api_client/api/marketplace_offering_users/marketplace_offering_users_list.py +15 -0
- waldur_api_client/api/{rancher_clusters/rancher_clusters_destroy.py → marketplace_orders/marketplace_orders_delete_attachment.py} +6 -4
- waldur_api_client/api/marketplace_orders/marketplace_orders_update_attachment.py +168 -0
- waldur_api_client/api/marketplace_provider_offerings/marketplace_provider_offerings_component_stats_list.py +15 -0
- waldur_api_client/api/marketplace_provider_offerings/marketplace_provider_offerings_costs_list.py +15 -0
- waldur_api_client/api/marketplace_provider_offerings/marketplace_provider_offerings_count.py +15 -0
- waldur_api_client/api/marketplace_provider_offerings/marketplace_provider_offerings_customers_list.py +15 -0
- waldur_api_client/api/marketplace_provider_offerings/marketplace_provider_offerings_groups_count.py +15 -0
- waldur_api_client/api/marketplace_provider_offerings/marketplace_provider_offerings_groups_list.py +15 -0
- waldur_api_client/api/marketplace_provider_offerings/marketplace_provider_offerings_list.py +15 -0
- waldur_api_client/api/marketplace_provider_offerings/marketplace_provider_offerings_list_course_accounts_retrieve.py +177 -0
- waldur_api_client/api/marketplace_provider_offerings/marketplace_provider_offerings_refresh_offering_usernames.py +0 -22
- waldur_api_client/api/marketplace_provider_offerings/marketplace_provider_offerings_update_compliance_checklist.py +105 -0
- waldur_api_client/api/marketplace_public_offerings/marketplace_public_offerings_count.py +15 -0
- waldur_api_client/api/marketplace_public_offerings/marketplace_public_offerings_list.py +15 -0
- waldur_api_client/api/marketplace_service_providers/marketplace_service_providers_course_accounts_list.py +98 -0
- waldur_api_client/api/marketplace_service_providers/marketplace_service_providers_offerings_list.py +15 -0
- waldur_api_client/api/user_invitations/user_invitations_count.py +15 -0
- waldur_api_client/api/user_invitations/user_invitations_list.py +15 -0
- waldur_api_client/models/__init__.py +34 -6
- waldur_api_client/models/booking_offerings_list_field_item.py +1 -0
- waldur_api_client/models/booking_offerings_retrieve_field_item.py +1 -0
- waldur_api_client/models/booking_resource.py +18 -0
- waldur_api_client/models/booking_resources_list_field_item.py +2 -0
- waldur_api_client/models/booking_resources_retrieve_field_item.py +2 -0
- waldur_api_client/models/country_enum.py +211 -0
- waldur_api_client/models/course_account.py +24 -0
- waldur_api_client/models/customer_request.py +9 -0
- waldur_api_client/models/deployment_mode_enum.py +9 -0
- waldur_api_client/models/group_invitation.py +8 -0
- waldur_api_client/models/identity_provider.py +57 -0
- waldur_api_client/models/identity_provider_request.py +57 -0
- waldur_api_client/models/invitation.py +8 -0
- waldur_api_client/models/issue.py +8 -17
- waldur_api_client/models/issue_request.py +8 -17
- waldur_api_client/models/issue_type_enum.py +4 -4
- waldur_api_client/models/managed_rancher_cluster_resources_list_field_item.py +2 -0
- waldur_api_client/models/managed_rancher_cluster_resources_retrieve_field_item.py +2 -0
- waldur_api_client/models/marketplace_course_accounts_count_o_item.py +23 -0
- waldur_api_client/models/marketplace_course_accounts_list_o_item.py +23 -0
- waldur_api_client/models/marketplace_offering_user_checklist_completions_count_o_item.py +11 -0
- waldur_api_client/models/marketplace_offering_user_checklist_completions_list_o_item.py +11 -0
- waldur_api_client/models/marketplace_offering_users_list_field_item.py +2 -0
- waldur_api_client/models/marketplace_offering_users_retrieve_field_item.py +2 -0
- waldur_api_client/models/marketplace_orders_list_field_item.py +5 -0
- waldur_api_client/models/marketplace_orders_retrieve_field_item.py +5 -0
- waldur_api_client/models/marketplace_provider_offerings_list_course_accounts_retrieve_field_item.py +72 -0
- waldur_api_client/models/marketplace_provider_resources_details_retrieve_field_item.py +2 -0
- waldur_api_client/models/marketplace_provider_resources_list_field_item.py +2 -0
- waldur_api_client/models/marketplace_provider_resources_retrieve_field_item.py +2 -0
- waldur_api_client/models/marketplace_public_offerings_list_field_item.py +1 -0
- waldur_api_client/models/marketplace_public_offerings_retrieve_field_item.py +1 -0
- waldur_api_client/models/marketplace_resources_details_retrieve_field_item.py +2 -0
- waldur_api_client/models/marketplace_resources_list_field_item.py +2 -0
- waldur_api_client/models/marketplace_resources_retrieve_field_item.py +2 -0
- waldur_api_client/models/marketplace_service_providers_course_accounts_list_o_item.py +23 -0
- waldur_api_client/models/merged_plugin_options.py +36 -0
- waldur_api_client/models/merged_plugin_options_request.py +36 -0
- waldur_api_client/models/notification.py +11 -0
- waldur_api_client/models/notification_context_fields.py +47 -0
- waldur_api_client/models/offering.py +9 -0
- waldur_api_client/models/offering_compliance_checklist_update_request.py +82 -0
- waldur_api_client/models/offering_create.py +9 -8
- waldur_api_client/models/offering_create_request.py +9 -0
- waldur_api_client/models/offering_overview_update_request.py +9 -0
- waldur_api_client/models/offering_terms_of_service.py +42 -1
- waldur_api_client/models/offering_user.py +18 -0
- waldur_api_client/models/open_stack_tenant_create_order_attributes.py +0 -18
- waldur_api_client/models/open_stack_tenant_request.py +18 -0
- waldur_api_client/models/order_attachment.py +71 -0
- waldur_api_client/models/order_attachment_request.py +84 -0
- waldur_api_client/models/order_create.py +58 -16
- waldur_api_client/models/order_create_request.py +44 -62
- waldur_api_client/models/order_details.py +99 -16
- waldur_api_client/models/patched_customer_request.py +9 -0
- waldur_api_client/models/patched_identity_provider_request.py +58 -0
- waldur_api_client/models/patched_project_request.py +9 -0
- waldur_api_client/models/patched_protected_call_request.py +9 -0
- waldur_api_client/models/patched_protected_round_request.py +2 -2
- waldur_api_client/models/patched_service_provider_request.py +9 -0
- waldur_api_client/models/patched_user_request.py +9 -0
- waldur_api_client/models/project_request.py +9 -0
- waldur_api_client/models/protected_call_request.py +9 -0
- waldur_api_client/models/protected_round.py +2 -2
- waldur_api_client/models/protected_round_request.py +2 -2
- waldur_api_client/models/public_offering_details.py +9 -0
- waldur_api_client/models/rancher_cluster_request.py +1 -48
- waldur_api_client/models/resource.py +18 -0
- waldur_api_client/models/resource_update_limits_request.py +23 -1
- waldur_api_client/models/service_provider_request.py +9 -0
- waldur_api_client/models/user_checklist_completion.py +265 -0
- waldur_api_client/models/user_consent_info.py +86 -0
- waldur_api_client/models/user_request.py +9 -0
- waldur_api_client/models/visible_invitation_details.py +8 -0
- {waldur_api_client-7.7.9.dist-info → waldur_api_client-7.8.1.dist-info}/METADATA +4 -2
- {waldur_api_client-7.7.9.dist-info → waldur_api_client-7.8.1.dist-info}/RECORD +105 -89
- {waldur_api_client-7.7.9.dist-info → waldur_api_client-7.8.1.dist-info}/WHEEL +1 -1
- waldur_api_client/models/marketplace_managed_rancher_create_order_attributes.py +0 -144
- waldur_api_client/models/marketplace_rancher_create_order_attributes.py +0 -145
- waldur_api_client/models/provider_offering_details_request.py +0 -398
- {waldur_api_client-7.7.9.dist-info → waldur_api_client-7.8.1.dist-info/licenses}/LICENSE +0 -0
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
from collections.abc import Mapping
|
|
2
|
+
from io import BytesIO
|
|
3
|
+
from typing import Any, TypeVar, Union, cast
|
|
4
|
+
|
|
5
|
+
from attrs import define as _attrs_define
|
|
6
|
+
from attrs import field as _attrs_field
|
|
7
|
+
|
|
8
|
+
from .. import types
|
|
9
|
+
from ..types import UNSET, File, Unset
|
|
10
|
+
|
|
11
|
+
T = TypeVar("T", bound="OrderAttachmentRequest")
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
@_attrs_define
|
|
15
|
+
class OrderAttachmentRequest:
|
|
16
|
+
"""
|
|
17
|
+
Attributes:
|
|
18
|
+
attachment (Union[File, None, Unset]):
|
|
19
|
+
"""
|
|
20
|
+
|
|
21
|
+
attachment: Union[File, None, Unset] = UNSET
|
|
22
|
+
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
|
|
23
|
+
|
|
24
|
+
def to_dict(self) -> dict[str, Any]:
|
|
25
|
+
attachment: Union[None, Unset, types.FileTypes]
|
|
26
|
+
if isinstance(self.attachment, Unset):
|
|
27
|
+
attachment = UNSET
|
|
28
|
+
elif isinstance(self.attachment, File):
|
|
29
|
+
attachment = self.attachment.to_tuple()
|
|
30
|
+
|
|
31
|
+
else:
|
|
32
|
+
attachment = self.attachment
|
|
33
|
+
|
|
34
|
+
field_dict: dict[str, Any] = {}
|
|
35
|
+
field_dict.update(self.additional_properties)
|
|
36
|
+
field_dict.update({})
|
|
37
|
+
if attachment is not UNSET:
|
|
38
|
+
field_dict["attachment"] = attachment
|
|
39
|
+
|
|
40
|
+
return field_dict
|
|
41
|
+
|
|
42
|
+
@classmethod
|
|
43
|
+
def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
|
|
44
|
+
d = dict(src_dict)
|
|
45
|
+
|
|
46
|
+
def _parse_attachment(data: object) -> Union[File, None, Unset]:
|
|
47
|
+
if data is None:
|
|
48
|
+
return data
|
|
49
|
+
if isinstance(data, Unset):
|
|
50
|
+
return data
|
|
51
|
+
try:
|
|
52
|
+
if not isinstance(data, bytes):
|
|
53
|
+
raise TypeError()
|
|
54
|
+
attachment_type_0 = File(payload=BytesIO(data))
|
|
55
|
+
|
|
56
|
+
return attachment_type_0
|
|
57
|
+
except: # noqa: E722
|
|
58
|
+
pass
|
|
59
|
+
return cast(Union[File, None, Unset], data)
|
|
60
|
+
|
|
61
|
+
attachment = _parse_attachment(d.pop("attachment", UNSET))
|
|
62
|
+
|
|
63
|
+
order_attachment_request = cls(
|
|
64
|
+
attachment=attachment,
|
|
65
|
+
)
|
|
66
|
+
|
|
67
|
+
order_attachment_request.additional_properties = d
|
|
68
|
+
return order_attachment_request
|
|
69
|
+
|
|
70
|
+
@property
|
|
71
|
+
def additional_keys(self) -> list[str]:
|
|
72
|
+
return list(self.additional_properties.keys())
|
|
73
|
+
|
|
74
|
+
def __getitem__(self, key: str) -> Any:
|
|
75
|
+
return self.additional_properties[key]
|
|
76
|
+
|
|
77
|
+
def __setitem__(self, key: str, value: Any) -> None:
|
|
78
|
+
self.additional_properties[key] = value
|
|
79
|
+
|
|
80
|
+
def __delitem__(self, key: str) -> None:
|
|
81
|
+
del self.additional_properties[key]
|
|
82
|
+
|
|
83
|
+
def __contains__(self, key: str) -> bool:
|
|
84
|
+
return key in self.additional_properties
|
|
@@ -53,7 +53,9 @@ class OrderCreate:
|
|
|
53
53
|
output (str):
|
|
54
54
|
marketplace_resource_uuid (UUID):
|
|
55
55
|
error_message (str):
|
|
56
|
+
error_traceback (str):
|
|
56
57
|
completed_at (Union[None, datetime.datetime]):
|
|
58
|
+
attachment (Union[None, str]):
|
|
57
59
|
url (str):
|
|
58
60
|
created_by (str):
|
|
59
61
|
created_by_username (str): Required. 128 characters or fewer. Lowercase letters, numbers and @/./+/-/_
|
|
@@ -73,8 +75,9 @@ class OrderCreate:
|
|
|
73
75
|
plan (Union[Unset, str]):
|
|
74
76
|
attributes (Union[Unset, Any]):
|
|
75
77
|
limits (Union[Unset, OrderCreateLimits]):
|
|
76
|
-
type_ (Union[Unset, RequestTypes]): Default: RequestTypes.CREATE.
|
|
77
78
|
callback_url (Union[None, Unset, str]):
|
|
79
|
+
request_comment (Union[None, Unset, str]):
|
|
80
|
+
type_ (Union[Unset, RequestTypes]): Default: RequestTypes.CREATE.
|
|
78
81
|
"""
|
|
79
82
|
|
|
80
83
|
offering: str
|
|
@@ -107,7 +110,9 @@ class OrderCreate:
|
|
|
107
110
|
output: str
|
|
108
111
|
marketplace_resource_uuid: UUID
|
|
109
112
|
error_message: str
|
|
113
|
+
error_traceback: str
|
|
110
114
|
completed_at: Union[None, datetime.datetime]
|
|
115
|
+
attachment: Union[None, str]
|
|
111
116
|
url: str
|
|
112
117
|
created_by: str
|
|
113
118
|
created_by_username: str
|
|
@@ -125,8 +130,9 @@ class OrderCreate:
|
|
|
125
130
|
plan: Union[Unset, str] = UNSET
|
|
126
131
|
attributes: Union[Unset, Any] = UNSET
|
|
127
132
|
limits: Union[Unset, "OrderCreateLimits"] = UNSET
|
|
128
|
-
type_: Union[Unset, RequestTypes] = RequestTypes.CREATE
|
|
129
133
|
callback_url: Union[None, Unset, str] = UNSET
|
|
134
|
+
request_comment: Union[None, Unset, str] = UNSET
|
|
135
|
+
type_: Union[Unset, RequestTypes] = RequestTypes.CREATE
|
|
130
136
|
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
|
|
131
137
|
|
|
132
138
|
def to_dict(self) -> dict[str, Any]:
|
|
@@ -206,12 +212,17 @@ class OrderCreate:
|
|
|
206
212
|
|
|
207
213
|
error_message = self.error_message
|
|
208
214
|
|
|
215
|
+
error_traceback = self.error_traceback
|
|
216
|
+
|
|
209
217
|
completed_at: Union[None, str]
|
|
210
218
|
if isinstance(self.completed_at, datetime.datetime):
|
|
211
219
|
completed_at = self.completed_at.isoformat()
|
|
212
220
|
else:
|
|
213
221
|
completed_at = self.completed_at
|
|
214
222
|
|
|
223
|
+
attachment: Union[None, str]
|
|
224
|
+
attachment = self.attachment
|
|
225
|
+
|
|
215
226
|
url = self.url
|
|
216
227
|
|
|
217
228
|
created_by = self.created_by
|
|
@@ -255,16 +266,22 @@ class OrderCreate:
|
|
|
255
266
|
if not isinstance(self.limits, Unset):
|
|
256
267
|
limits = self.limits.to_dict()
|
|
257
268
|
|
|
258
|
-
type_: Union[Unset, str] = UNSET
|
|
259
|
-
if not isinstance(self.type_, Unset):
|
|
260
|
-
type_ = self.type_.value
|
|
261
|
-
|
|
262
269
|
callback_url: Union[None, Unset, str]
|
|
263
270
|
if isinstance(self.callback_url, Unset):
|
|
264
271
|
callback_url = UNSET
|
|
265
272
|
else:
|
|
266
273
|
callback_url = self.callback_url
|
|
267
274
|
|
|
275
|
+
request_comment: Union[None, Unset, str]
|
|
276
|
+
if isinstance(self.request_comment, Unset):
|
|
277
|
+
request_comment = UNSET
|
|
278
|
+
else:
|
|
279
|
+
request_comment = self.request_comment
|
|
280
|
+
|
|
281
|
+
type_: Union[Unset, str] = UNSET
|
|
282
|
+
if not isinstance(self.type_, Unset):
|
|
283
|
+
type_ = self.type_.value
|
|
284
|
+
|
|
268
285
|
field_dict: dict[str, Any] = {}
|
|
269
286
|
field_dict.update(self.additional_properties)
|
|
270
287
|
field_dict.update(
|
|
@@ -299,7 +316,9 @@ class OrderCreate:
|
|
|
299
316
|
"output": output,
|
|
300
317
|
"marketplace_resource_uuid": marketplace_resource_uuid,
|
|
301
318
|
"error_message": error_message,
|
|
319
|
+
"error_traceback": error_traceback,
|
|
302
320
|
"completed_at": completed_at,
|
|
321
|
+
"attachment": attachment,
|
|
303
322
|
"url": url,
|
|
304
323
|
"created_by": created_by,
|
|
305
324
|
"created_by_username": created_by_username,
|
|
@@ -322,10 +341,12 @@ class OrderCreate:
|
|
|
322
341
|
field_dict["attributes"] = attributes
|
|
323
342
|
if limits is not UNSET:
|
|
324
343
|
field_dict["limits"] = limits
|
|
325
|
-
if type_ is not UNSET:
|
|
326
|
-
field_dict["type"] = type_
|
|
327
344
|
if callback_url is not UNSET:
|
|
328
345
|
field_dict["callback_url"] = callback_url
|
|
346
|
+
if request_comment is not UNSET:
|
|
347
|
+
field_dict["request_comment"] = request_comment
|
|
348
|
+
if type_ is not UNSET:
|
|
349
|
+
field_dict["type"] = type_
|
|
329
350
|
|
|
330
351
|
return field_dict
|
|
331
352
|
|
|
@@ -453,6 +474,8 @@ class OrderCreate:
|
|
|
453
474
|
|
|
454
475
|
error_message = d.pop("error_message")
|
|
455
476
|
|
|
477
|
+
error_traceback = d.pop("error_traceback")
|
|
478
|
+
|
|
456
479
|
def _parse_completed_at(data: object) -> Union[None, datetime.datetime]:
|
|
457
480
|
if data is None:
|
|
458
481
|
return data
|
|
@@ -468,6 +491,13 @@ class OrderCreate:
|
|
|
468
491
|
|
|
469
492
|
completed_at = _parse_completed_at(d.pop("completed_at"))
|
|
470
493
|
|
|
494
|
+
def _parse_attachment(data: object) -> Union[None, str]:
|
|
495
|
+
if data is None:
|
|
496
|
+
return data
|
|
497
|
+
return cast(Union[None, str], data)
|
|
498
|
+
|
|
499
|
+
attachment = _parse_attachment(d.pop("attachment"))
|
|
500
|
+
|
|
471
501
|
url = d.pop("url")
|
|
472
502
|
|
|
473
503
|
created_by = d.pop("created_by")
|
|
@@ -535,13 +565,6 @@ class OrderCreate:
|
|
|
535
565
|
else:
|
|
536
566
|
limits = OrderCreateLimits.from_dict(_limits)
|
|
537
567
|
|
|
538
|
-
_type_ = d.pop("type", UNSET)
|
|
539
|
-
type_: Union[Unset, RequestTypes]
|
|
540
|
-
if isinstance(_type_, Unset):
|
|
541
|
-
type_ = UNSET
|
|
542
|
-
else:
|
|
543
|
-
type_ = RequestTypes(_type_)
|
|
544
|
-
|
|
545
568
|
def _parse_callback_url(data: object) -> Union[None, Unset, str]:
|
|
546
569
|
if data is None:
|
|
547
570
|
return data
|
|
@@ -551,6 +574,22 @@ class OrderCreate:
|
|
|
551
574
|
|
|
552
575
|
callback_url = _parse_callback_url(d.pop("callback_url", UNSET))
|
|
553
576
|
|
|
577
|
+
def _parse_request_comment(data: object) -> Union[None, Unset, str]:
|
|
578
|
+
if data is None:
|
|
579
|
+
return data
|
|
580
|
+
if isinstance(data, Unset):
|
|
581
|
+
return data
|
|
582
|
+
return cast(Union[None, Unset, str], data)
|
|
583
|
+
|
|
584
|
+
request_comment = _parse_request_comment(d.pop("request_comment", UNSET))
|
|
585
|
+
|
|
586
|
+
_type_ = d.pop("type", UNSET)
|
|
587
|
+
type_: Union[Unset, RequestTypes]
|
|
588
|
+
if isinstance(_type_, Unset):
|
|
589
|
+
type_ = UNSET
|
|
590
|
+
else:
|
|
591
|
+
type_ = RequestTypes(_type_)
|
|
592
|
+
|
|
554
593
|
order_create = cls(
|
|
555
594
|
offering=offering,
|
|
556
595
|
offering_name=offering_name,
|
|
@@ -582,7 +621,9 @@ class OrderCreate:
|
|
|
582
621
|
output=output,
|
|
583
622
|
marketplace_resource_uuid=marketplace_resource_uuid,
|
|
584
623
|
error_message=error_message,
|
|
624
|
+
error_traceback=error_traceback,
|
|
585
625
|
completed_at=completed_at,
|
|
626
|
+
attachment=attachment,
|
|
586
627
|
url=url,
|
|
587
628
|
created_by=created_by,
|
|
588
629
|
created_by_username=created_by_username,
|
|
@@ -600,8 +641,9 @@ class OrderCreate:
|
|
|
600
641
|
plan=plan,
|
|
601
642
|
attributes=attributes,
|
|
602
643
|
limits=limits,
|
|
603
|
-
type_=type_,
|
|
604
644
|
callback_url=callback_url,
|
|
645
|
+
request_comment=request_comment,
|
|
646
|
+
type_=type_,
|
|
605
647
|
)
|
|
606
648
|
|
|
607
649
|
order_create.additional_properties = d
|
|
@@ -11,10 +11,6 @@ if TYPE_CHECKING:
|
|
|
11
11
|
from ..models.azure_sql_server_create_order_attributes import AzureSQLServerCreateOrderAttributes
|
|
12
12
|
from ..models.azure_virtual_machine_create_order_attributes import AzureVirtualMachineCreateOrderAttributes
|
|
13
13
|
from ..models.generic_order_attributes import GenericOrderAttributes
|
|
14
|
-
from ..models.marketplace_managed_rancher_create_order_attributes import (
|
|
15
|
-
MarketplaceManagedRancherCreateOrderAttributes,
|
|
16
|
-
)
|
|
17
|
-
from ..models.marketplace_rancher_create_order_attributes import MarketplaceRancherCreateOrderAttributes
|
|
18
14
|
from ..models.open_stack_instance_create_order_attributes import OpenStackInstanceCreateOrderAttributes
|
|
19
15
|
from ..models.open_stack_tenant_create_order_attributes import OpenStackTenantCreateOrderAttributes
|
|
20
16
|
from ..models.open_stack_volume_create_order_attributes import OpenStackVolumeCreateOrderAttributes
|
|
@@ -36,16 +32,15 @@ class OrderCreateRequest:
|
|
|
36
32
|
project (str):
|
|
37
33
|
plan (Union[Unset, str]):
|
|
38
34
|
attributes (Union['AzureSQLServerCreateOrderAttributes', 'AzureVirtualMachineCreateOrderAttributes',
|
|
39
|
-
'GenericOrderAttributes', '
|
|
40
|
-
'
|
|
41
|
-
'
|
|
42
|
-
|
|
43
|
-
Attributes structure depends on the offering type specified in the parent object. Can also be a generic object
|
|
44
|
-
for offerings without a specific attributes schema.
|
|
35
|
+
'GenericOrderAttributes', 'OpenStackInstanceCreateOrderAttributes', 'OpenStackTenantCreateOrderAttributes',
|
|
36
|
+
'OpenStackVolumeCreateOrderAttributes', 'SlurmInvoicesSlurmPackageCreateOrderAttributes',
|
|
37
|
+
'VMwareVirtualMachineCreateOrderAttributes', Unset]): Attributes structure depends on the offering type
|
|
38
|
+
specified in the parent object. Can also be a generic object for offerings without a specific attributes schema.
|
|
45
39
|
limits (Union[Unset, OrderCreateRequestLimits]):
|
|
46
|
-
type_ (Union[Unset, RequestTypes]): Default: RequestTypes.CREATE.
|
|
47
40
|
accepting_terms_of_service (Union[Unset, bool]):
|
|
48
41
|
callback_url (Union[None, Unset, str]):
|
|
42
|
+
request_comment (Union[None, Unset, str]):
|
|
43
|
+
type_ (Union[Unset, RequestTypes]): Default: RequestTypes.CREATE.
|
|
49
44
|
"""
|
|
50
45
|
|
|
51
46
|
offering: str
|
|
@@ -55,8 +50,6 @@ class OrderCreateRequest:
|
|
|
55
50
|
"AzureSQLServerCreateOrderAttributes",
|
|
56
51
|
"AzureVirtualMachineCreateOrderAttributes",
|
|
57
52
|
"GenericOrderAttributes",
|
|
58
|
-
"MarketplaceManagedRancherCreateOrderAttributes",
|
|
59
|
-
"MarketplaceRancherCreateOrderAttributes",
|
|
60
53
|
"OpenStackInstanceCreateOrderAttributes",
|
|
61
54
|
"OpenStackTenantCreateOrderAttributes",
|
|
62
55
|
"OpenStackVolumeCreateOrderAttributes",
|
|
@@ -65,18 +58,15 @@ class OrderCreateRequest:
|
|
|
65
58
|
Unset,
|
|
66
59
|
] = UNSET
|
|
67
60
|
limits: Union[Unset, "OrderCreateRequestLimits"] = UNSET
|
|
68
|
-
type_: Union[Unset, RequestTypes] = RequestTypes.CREATE
|
|
69
61
|
accepting_terms_of_service: Union[Unset, bool] = UNSET
|
|
70
62
|
callback_url: Union[None, Unset, str] = UNSET
|
|
63
|
+
request_comment: Union[None, Unset, str] = UNSET
|
|
64
|
+
type_: Union[Unset, RequestTypes] = RequestTypes.CREATE
|
|
71
65
|
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
|
|
72
66
|
|
|
73
67
|
def to_dict(self) -> dict[str, Any]:
|
|
74
68
|
from ..models.azure_sql_server_create_order_attributes import AzureSQLServerCreateOrderAttributes
|
|
75
69
|
from ..models.azure_virtual_machine_create_order_attributes import AzureVirtualMachineCreateOrderAttributes
|
|
76
|
-
from ..models.marketplace_managed_rancher_create_order_attributes import (
|
|
77
|
-
MarketplaceManagedRancherCreateOrderAttributes,
|
|
78
|
-
)
|
|
79
|
-
from ..models.marketplace_rancher_create_order_attributes import MarketplaceRancherCreateOrderAttributes
|
|
80
70
|
from ..models.open_stack_instance_create_order_attributes import OpenStackInstanceCreateOrderAttributes
|
|
81
71
|
from ..models.open_stack_tenant_create_order_attributes import OpenStackTenantCreateOrderAttributes
|
|
82
72
|
from ..models.open_stack_volume_create_order_attributes import OpenStackVolumeCreateOrderAttributes
|
|
@@ -104,10 +94,6 @@ class OrderCreateRequest:
|
|
|
104
94
|
attributes = self.attributes.to_dict()
|
|
105
95
|
elif isinstance(self.attributes, OpenStackVolumeCreateOrderAttributes):
|
|
106
96
|
attributes = self.attributes.to_dict()
|
|
107
|
-
elif isinstance(self.attributes, MarketplaceRancherCreateOrderAttributes):
|
|
108
|
-
attributes = self.attributes.to_dict()
|
|
109
|
-
elif isinstance(self.attributes, MarketplaceManagedRancherCreateOrderAttributes):
|
|
110
|
-
attributes = self.attributes.to_dict()
|
|
111
97
|
elif isinstance(self.attributes, SlurmInvoicesSlurmPackageCreateOrderAttributes):
|
|
112
98
|
attributes = self.attributes.to_dict()
|
|
113
99
|
elif isinstance(self.attributes, VMwareVirtualMachineCreateOrderAttributes):
|
|
@@ -119,10 +105,6 @@ class OrderCreateRequest:
|
|
|
119
105
|
if not isinstance(self.limits, Unset):
|
|
120
106
|
limits = self.limits.to_dict()
|
|
121
107
|
|
|
122
|
-
type_: Union[Unset, str] = UNSET
|
|
123
|
-
if not isinstance(self.type_, Unset):
|
|
124
|
-
type_ = self.type_.value
|
|
125
|
-
|
|
126
108
|
accepting_terms_of_service = self.accepting_terms_of_service
|
|
127
109
|
|
|
128
110
|
callback_url: Union[None, Unset, str]
|
|
@@ -131,6 +113,16 @@ class OrderCreateRequest:
|
|
|
131
113
|
else:
|
|
132
114
|
callback_url = self.callback_url
|
|
133
115
|
|
|
116
|
+
request_comment: Union[None, Unset, str]
|
|
117
|
+
if isinstance(self.request_comment, Unset):
|
|
118
|
+
request_comment = UNSET
|
|
119
|
+
else:
|
|
120
|
+
request_comment = self.request_comment
|
|
121
|
+
|
|
122
|
+
type_: Union[Unset, str] = UNSET
|
|
123
|
+
if not isinstance(self.type_, Unset):
|
|
124
|
+
type_ = self.type_.value
|
|
125
|
+
|
|
134
126
|
field_dict: dict[str, Any] = {}
|
|
135
127
|
field_dict.update(self.additional_properties)
|
|
136
128
|
field_dict.update(
|
|
@@ -145,12 +137,14 @@ class OrderCreateRequest:
|
|
|
145
137
|
field_dict["attributes"] = attributes
|
|
146
138
|
if limits is not UNSET:
|
|
147
139
|
field_dict["limits"] = limits
|
|
148
|
-
if type_ is not UNSET:
|
|
149
|
-
field_dict["type"] = type_
|
|
150
140
|
if accepting_terms_of_service is not UNSET:
|
|
151
141
|
field_dict["accepting_terms_of_service"] = accepting_terms_of_service
|
|
152
142
|
if callback_url is not UNSET:
|
|
153
143
|
field_dict["callback_url"] = callback_url
|
|
144
|
+
if request_comment is not UNSET:
|
|
145
|
+
field_dict["request_comment"] = request_comment
|
|
146
|
+
if type_ is not UNSET:
|
|
147
|
+
field_dict["type"] = type_
|
|
154
148
|
|
|
155
149
|
return field_dict
|
|
156
150
|
|
|
@@ -159,10 +153,6 @@ class OrderCreateRequest:
|
|
|
159
153
|
from ..models.azure_sql_server_create_order_attributes import AzureSQLServerCreateOrderAttributes
|
|
160
154
|
from ..models.azure_virtual_machine_create_order_attributes import AzureVirtualMachineCreateOrderAttributes
|
|
161
155
|
from ..models.generic_order_attributes import GenericOrderAttributes
|
|
162
|
-
from ..models.marketplace_managed_rancher_create_order_attributes import (
|
|
163
|
-
MarketplaceManagedRancherCreateOrderAttributes,
|
|
164
|
-
)
|
|
165
|
-
from ..models.marketplace_rancher_create_order_attributes import MarketplaceRancherCreateOrderAttributes
|
|
166
156
|
from ..models.open_stack_instance_create_order_attributes import OpenStackInstanceCreateOrderAttributes
|
|
167
157
|
from ..models.open_stack_tenant_create_order_attributes import OpenStackTenantCreateOrderAttributes
|
|
168
158
|
from ..models.open_stack_volume_create_order_attributes import OpenStackVolumeCreateOrderAttributes
|
|
@@ -185,8 +175,6 @@ class OrderCreateRequest:
|
|
|
185
175
|
"AzureSQLServerCreateOrderAttributes",
|
|
186
176
|
"AzureVirtualMachineCreateOrderAttributes",
|
|
187
177
|
"GenericOrderAttributes",
|
|
188
|
-
"MarketplaceManagedRancherCreateOrderAttributes",
|
|
189
|
-
"MarketplaceRancherCreateOrderAttributes",
|
|
190
178
|
"OpenStackInstanceCreateOrderAttributes",
|
|
191
179
|
"OpenStackTenantCreateOrderAttributes",
|
|
192
180
|
"OpenStackVolumeCreateOrderAttributes",
|
|
@@ -239,7 +227,7 @@ class OrderCreateRequest:
|
|
|
239
227
|
try:
|
|
240
228
|
if not isinstance(data, dict):
|
|
241
229
|
raise TypeError()
|
|
242
|
-
attributes_type_5 =
|
|
230
|
+
attributes_type_5 = SlurmInvoicesSlurmPackageCreateOrderAttributes.from_dict(data)
|
|
243
231
|
|
|
244
232
|
return attributes_type_5
|
|
245
233
|
except: # noqa: E722
|
|
@@ -247,32 +235,16 @@ class OrderCreateRequest:
|
|
|
247
235
|
try:
|
|
248
236
|
if not isinstance(data, dict):
|
|
249
237
|
raise TypeError()
|
|
250
|
-
attributes_type_6 =
|
|
238
|
+
attributes_type_6 = VMwareVirtualMachineCreateOrderAttributes.from_dict(data)
|
|
251
239
|
|
|
252
240
|
return attributes_type_6
|
|
253
241
|
except: # noqa: E722
|
|
254
242
|
pass
|
|
255
|
-
try:
|
|
256
|
-
if not isinstance(data, dict):
|
|
257
|
-
raise TypeError()
|
|
258
|
-
attributes_type_7 = SlurmInvoicesSlurmPackageCreateOrderAttributes.from_dict(data)
|
|
259
|
-
|
|
260
|
-
return attributes_type_7
|
|
261
|
-
except: # noqa: E722
|
|
262
|
-
pass
|
|
263
|
-
try:
|
|
264
|
-
if not isinstance(data, dict):
|
|
265
|
-
raise TypeError()
|
|
266
|
-
attributes_type_8 = VMwareVirtualMachineCreateOrderAttributes.from_dict(data)
|
|
267
|
-
|
|
268
|
-
return attributes_type_8
|
|
269
|
-
except: # noqa: E722
|
|
270
|
-
pass
|
|
271
243
|
if not isinstance(data, dict):
|
|
272
244
|
raise TypeError()
|
|
273
|
-
|
|
245
|
+
attributes_type_7 = GenericOrderAttributes.from_dict(data)
|
|
274
246
|
|
|
275
|
-
return
|
|
247
|
+
return attributes_type_7
|
|
276
248
|
|
|
277
249
|
attributes = _parse_attributes(d.pop("attributes", UNSET))
|
|
278
250
|
|
|
@@ -283,13 +255,6 @@ class OrderCreateRequest:
|
|
|
283
255
|
else:
|
|
284
256
|
limits = OrderCreateRequestLimits.from_dict(_limits)
|
|
285
257
|
|
|
286
|
-
_type_ = d.pop("type", UNSET)
|
|
287
|
-
type_: Union[Unset, RequestTypes]
|
|
288
|
-
if isinstance(_type_, Unset):
|
|
289
|
-
type_ = UNSET
|
|
290
|
-
else:
|
|
291
|
-
type_ = RequestTypes(_type_)
|
|
292
|
-
|
|
293
258
|
accepting_terms_of_service = d.pop("accepting_terms_of_service", UNSET)
|
|
294
259
|
|
|
295
260
|
def _parse_callback_url(data: object) -> Union[None, Unset, str]:
|
|
@@ -301,15 +266,32 @@ class OrderCreateRequest:
|
|
|
301
266
|
|
|
302
267
|
callback_url = _parse_callback_url(d.pop("callback_url", UNSET))
|
|
303
268
|
|
|
269
|
+
def _parse_request_comment(data: object) -> Union[None, Unset, str]:
|
|
270
|
+
if data is None:
|
|
271
|
+
return data
|
|
272
|
+
if isinstance(data, Unset):
|
|
273
|
+
return data
|
|
274
|
+
return cast(Union[None, Unset, str], data)
|
|
275
|
+
|
|
276
|
+
request_comment = _parse_request_comment(d.pop("request_comment", UNSET))
|
|
277
|
+
|
|
278
|
+
_type_ = d.pop("type", UNSET)
|
|
279
|
+
type_: Union[Unset, RequestTypes]
|
|
280
|
+
if isinstance(_type_, Unset):
|
|
281
|
+
type_ = UNSET
|
|
282
|
+
else:
|
|
283
|
+
type_ = RequestTypes(_type_)
|
|
284
|
+
|
|
304
285
|
order_create_request = cls(
|
|
305
286
|
offering=offering,
|
|
306
287
|
project=project,
|
|
307
288
|
plan=plan,
|
|
308
289
|
attributes=attributes,
|
|
309
290
|
limits=limits,
|
|
310
|
-
type_=type_,
|
|
311
291
|
accepting_terms_of_service=accepting_terms_of_service,
|
|
312
292
|
callback_url=callback_url,
|
|
293
|
+
request_comment=request_comment,
|
|
294
|
+
type_=type_,
|
|
313
295
|
)
|
|
314
296
|
|
|
315
297
|
order_create_request.additional_properties = d
|