waldur-api-client 7.7.6__py3-none-any.whl → 7.7.7__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.

Files changed (143) hide show
  1. waldur_api_client/api/booking_resources/booking_resources_count.py +34 -11
  2. waldur_api_client/api/booking_resources/booking_resources_list.py +34 -11
  3. waldur_api_client/api/customers/customers_project_metadata_compliance_details_list.py +189 -0
  4. waldur_api_client/api/customers/customers_project_metadata_compliance_overview_list.py +189 -0
  5. waldur_api_client/api/customers/customers_project_metadata_compliance_projects_list.py +187 -0
  6. waldur_api_client/api/customers/customers_project_metadata_question_answers_list.py +187 -0
  7. waldur_api_client/api/marketplace_integration_statuses/marketplace_integration_statuses_count.py +34 -11
  8. waldur_api_client/api/marketplace_integration_statuses/marketplace_integration_statuses_list.py +34 -11
  9. waldur_api_client/api/marketplace_offering_files/marketplace_offering_files_count.py +34 -11
  10. waldur_api_client/api/marketplace_offering_files/marketplace_offering_files_list.py +34 -11
  11. waldur_api_client/api/marketplace_offering_terms_of_service/__init__.py +1 -0
  12. waldur_api_client/api/marketplace_offering_terms_of_service/marketplace_offering_terms_of_service_count.py +274 -0
  13. waldur_api_client/api/marketplace_offering_terms_of_service/marketplace_offering_terms_of_service_create.py +152 -0
  14. waldur_api_client/api/marketplace_offering_terms_of_service/marketplace_offering_terms_of_service_destroy.py +89 -0
  15. waldur_api_client/api/marketplace_offering_terms_of_service/marketplace_offering_terms_of_service_list.py +277 -0
  16. waldur_api_client/api/marketplace_offering_terms_of_service/marketplace_offering_terms_of_service_partial_update.py +164 -0
  17. waldur_api_client/api/marketplace_offering_terms_of_service/marketplace_offering_terms_of_service_retrieve.py +142 -0
  18. waldur_api_client/api/marketplace_offering_terms_of_service/marketplace_offering_terms_of_service_update.py +164 -0
  19. waldur_api_client/api/marketplace_offering_user_roles/marketplace_offering_user_roles_count.py +34 -11
  20. waldur_api_client/api/marketplace_offering_user_roles/marketplace_offering_user_roles_list.py +34 -11
  21. waldur_api_client/api/marketplace_offering_users/marketplace_offering_users_count.py +34 -11
  22. waldur_api_client/api/marketplace_offering_users/marketplace_offering_users_list.py +34 -11
  23. waldur_api_client/api/marketplace_orders/marketplace_orders_count.py +19 -0
  24. waldur_api_client/api/marketplace_orders/marketplace_orders_list.py +19 -0
  25. waldur_api_client/api/marketplace_plans/marketplace_plans_count.py +19 -0
  26. waldur_api_client/api/marketplace_plans/marketplace_plans_list.py +19 -0
  27. waldur_api_client/api/marketplace_plans/marketplace_plans_usage_stats_count.py +19 -0
  28. waldur_api_client/api/marketplace_plans/marketplace_plans_usage_stats_list.py +19 -0
  29. waldur_api_client/api/marketplace_provider_resources/marketplace_provider_resources_count.py +34 -11
  30. waldur_api_client/api/marketplace_provider_resources/marketplace_provider_resources_list.py +34 -11
  31. waldur_api_client/api/marketplace_resources/marketplace_resources_count.py +34 -11
  32. waldur_api_client/api/marketplace_resources/marketplace_resources_list.py +34 -11
  33. waldur_api_client/api/marketplace_screenshots/marketplace_screenshots_count.py +34 -11
  34. waldur_api_client/api/marketplace_screenshots/marketplace_screenshots_list.py +34 -11
  35. waldur_api_client/api/marketplace_user_offering_consents/__init__.py +1 -0
  36. waldur_api_client/api/marketplace_user_offering_consents/marketplace_user_offering_consents_count.py +307 -0
  37. waldur_api_client/api/marketplace_user_offering_consents/marketplace_user_offering_consents_create.py +152 -0
  38. waldur_api_client/api/marketplace_user_offering_consents/marketplace_user_offering_consents_destroy.py +89 -0
  39. waldur_api_client/api/marketplace_user_offering_consents/marketplace_user_offering_consents_list.py +310 -0
  40. waldur_api_client/api/marketplace_user_offering_consents/marketplace_user_offering_consents_partial_update.py +164 -0
  41. waldur_api_client/api/marketplace_user_offering_consents/marketplace_user_offering_consents_retrieve.py +142 -0
  42. waldur_api_client/api/marketplace_user_offering_consents/marketplace_user_offering_consents_revoke.py +146 -0
  43. waldur_api_client/api/marketplace_user_offering_consents/marketplace_user_offering_consents_update.py +164 -0
  44. waldur_api_client/api/remote_waldur_api/remote_waldur_api_remote_resource_order_status_retrieve.py +145 -0
  45. waldur_api_client/api/remote_waldur_api/remote_waldur_api_remote_resource_status_retrieve.py +147 -0
  46. waldur_api_client/api/remote_waldur_api/remote_waldur_api_remote_resource_team_status_list.py +188 -0
  47. waldur_api_client/models/__init__.py +62 -0
  48. waldur_api_client/models/azure_sql_server_create_order_attributes.py +3 -0
  49. waldur_api_client/models/azure_virtual_machine_create_order_attributes.py +3 -0
  50. waldur_api_client/models/booking_offerings_list_field_item.py +0 -2
  51. waldur_api_client/models/booking_offerings_retrieve_field_item.py +0 -2
  52. waldur_api_client/models/booking_resource.py +10 -9
  53. waldur_api_client/models/booking_resources_list_field_item.py +1 -1
  54. waldur_api_client/models/booking_resources_retrieve_field_item.py +1 -1
  55. waldur_api_client/models/checklist_info.py +76 -0
  56. waldur_api_client/models/compliance_overview.py +91 -0
  57. waldur_api_client/models/customer.py +81 -0
  58. waldur_api_client/models/customers_list_field_item.py +4 -0
  59. waldur_api_client/models/customers_retrieve_field_item.py +4 -0
  60. waldur_api_client/models/generic_order_attributes.py +69 -0
  61. waldur_api_client/models/google_auth_authorize_retrieve_field_item.py +1 -0
  62. waldur_api_client/models/google_auth_list_field_item.py +1 -0
  63. waldur_api_client/models/google_auth_retrieve_field_item.py +1 -0
  64. waldur_api_client/models/google_credentials.py +9 -0
  65. waldur_api_client/models/group_invitation.py +24 -0
  66. waldur_api_client/models/group_invitation_request.py +10 -0
  67. waldur_api_client/models/maintenance_announcement.py +8 -0
  68. waldur_api_client/models/marketplace_offering_terms_of_service_count_o_item.py +13 -0
  69. waldur_api_client/models/marketplace_offering_terms_of_service_list_o_item.py +13 -0
  70. waldur_api_client/models/marketplace_orders_list_field_item.py +1 -1
  71. waldur_api_client/models/marketplace_orders_retrieve_field_item.py +1 -1
  72. waldur_api_client/models/marketplace_provider_offerings_list_customer_service_accounts_retrieve_field_item.py +0 -2
  73. waldur_api_client/models/marketplace_provider_offerings_list_field_item.py +0 -2
  74. waldur_api_client/models/marketplace_provider_offerings_list_project_service_accounts_retrieve_field_item.py +0 -2
  75. waldur_api_client/models/marketplace_provider_offerings_retrieve_field_item.py +0 -2
  76. waldur_api_client/models/marketplace_provider_offerings_stats_retrieve_field_item.py +0 -2
  77. waldur_api_client/models/marketplace_provider_offerings_user_has_resource_access_retrieve_field_item.py +0 -2
  78. waldur_api_client/models/marketplace_provider_resources_details_retrieve_field_item.py +1 -1
  79. waldur_api_client/models/marketplace_provider_resources_list_field_item.py +1 -1
  80. waldur_api_client/models/marketplace_provider_resources_retrieve_field_item.py +1 -1
  81. waldur_api_client/models/marketplace_public_offerings_list_field_item.py +0 -2
  82. waldur_api_client/models/marketplace_public_offerings_retrieve_field_item.py +0 -2
  83. waldur_api_client/models/marketplace_rancher_create_order_attributes.py +3 -0
  84. waldur_api_client/models/marketplace_resources_details_retrieve_field_item.py +1 -1
  85. waldur_api_client/models/marketplace_resources_list_field_item.py +1 -1
  86. waldur_api_client/models/marketplace_resources_retrieve_field_item.py +1 -1
  87. waldur_api_client/models/marketplace_service_providers_list_field_item.py +1 -0
  88. waldur_api_client/models/marketplace_service_providers_retrieve_field_item.py +1 -0
  89. waldur_api_client/models/marketplace_user_offering_consents_count_o_item.py +15 -0
  90. waldur_api_client/models/marketplace_user_offering_consents_list_o_item.py +15 -0
  91. waldur_api_client/models/offering.py +0 -18
  92. waldur_api_client/models/offering_create.py +0 -18
  93. waldur_api_client/models/offering_create_request.py +0 -18
  94. waldur_api_client/models/offering_overview_update_request.py +0 -18
  95. waldur_api_client/models/offering_terms_of_service.py +142 -0
  96. waldur_api_client/models/offering_terms_of_service_create.py +107 -0
  97. waldur_api_client/models/offering_terms_of_service_create_request.py +107 -0
  98. waldur_api_client/models/offering_terms_of_service_request.py +96 -0
  99. waldur_api_client/models/open_stack_instance_create_order_attributes.py +3 -0
  100. waldur_api_client/models/open_stack_nested_security_group.py +53 -1
  101. waldur_api_client/models/open_stack_nested_security_group_rules_item.py +197 -0
  102. waldur_api_client/models/open_stack_network.py +20 -0
  103. waldur_api_client/models/open_stack_security_group_rule_update_request.py +4 -4
  104. waldur_api_client/models/open_stack_tenant.py +38 -0
  105. waldur_api_client/models/open_stack_tenant_create_order_attributes.py +21 -0
  106. waldur_api_client/models/open_stack_volume_create_order_attributes.py +3 -0
  107. waldur_api_client/models/openstack_networks_list_field_item.py +1 -0
  108. waldur_api_client/models/openstack_networks_retrieve_field_item.py +1 -0
  109. waldur_api_client/models/openstack_tenants_list_field_item.py +3 -0
  110. waldur_api_client/models/openstack_tenants_retrieve_field_item.py +3 -0
  111. waldur_api_client/models/order_create.py +0 -8
  112. waldur_api_client/models/order_create_request.py +23 -7
  113. waldur_api_client/models/order_details.py +0 -9
  114. waldur_api_client/models/patched_offering_terms_of_service_request.py +96 -0
  115. waldur_api_client/models/patched_user_offering_consent_request.py +59 -0
  116. waldur_api_client/models/permission_project.py +147 -0
  117. waldur_api_client/models/project_answer.py +122 -0
  118. waldur_api_client/models/project_detail.py +133 -0
  119. waldur_api_client/models/project_details_response.py +115 -0
  120. waldur_api_client/models/provider_offering_details.py +0 -18
  121. waldur_api_client/models/provider_offering_details_request.py +0 -18
  122. waldur_api_client/models/public_offering_details.py +0 -18
  123. waldur_api_client/models/question_answer.py +176 -0
  124. waldur_api_client/models/question_answer_project_answers_item.py +44 -0
  125. waldur_api_client/models/question_answer_question_options_item.py +44 -0
  126. waldur_api_client/models/remote_resource_order.py +88 -0
  127. waldur_api_client/models/remote_resource_order_remote_state_enum.py +15 -0
  128. waldur_api_client/models/remote_resource_sync_status.py +123 -0
  129. waldur_api_client/models/remote_resource_sync_status_remote_state_enum.py +13 -0
  130. waldur_api_client/models/remote_resource_team_member.py +85 -0
  131. waldur_api_client/models/resource.py +10 -9
  132. waldur_api_client/models/service_provider.py +9 -0
  133. waldur_api_client/models/slurm_invoices_slurm_package_create_order_attributes.py +3 -0
  134. waldur_api_client/models/sync_status_enum.py +10 -0
  135. waldur_api_client/models/user_offering_consent.py +202 -0
  136. waldur_api_client/models/user_offering_consent_create.py +60 -0
  137. waldur_api_client/models/user_offering_consent_create_request.py +60 -0
  138. waldur_api_client/models/user_offering_consent_request.py +59 -0
  139. waldur_api_client/models/v_mware_virtual_machine_create_order_attributes.py +3 -0
  140. {waldur_api_client-7.7.6.dist-info → waldur_api_client-7.7.7.dist-info}/METADATA +1 -1
  141. {waldur_api_client-7.7.6.dist-info → waldur_api_client-7.7.7.dist-info}/RECORD +143 -88
  142. {waldur_api_client-7.7.6.dist-info → waldur_api_client-7.7.7.dist-info}/LICENSE +0 -0
  143. {waldur_api_client-7.7.6.dist-info → waldur_api_client-7.7.7.dist-info}/WHEEL +0 -0
@@ -0,0 +1,142 @@
1
+ import datetime
2
+ from collections.abc import Mapping
3
+ from typing import Any, TypeVar, Union
4
+ from uuid import UUID
5
+
6
+ from attrs import define as _attrs_define
7
+ from attrs import field as _attrs_field
8
+ from dateutil.parser import isoparse
9
+
10
+ from ..types import UNSET, Unset
11
+
12
+ T = TypeVar("T", bound="OfferingTermsOfService")
13
+
14
+
15
+ @_attrs_define
16
+ class OfferingTermsOfService:
17
+ """
18
+ Attributes:
19
+ uuid (UUID):
20
+ offering_uuid (UUID):
21
+ offering_name (str):
22
+ created (datetime.datetime):
23
+ modified (datetime.datetime):
24
+ terms_of_service (Union[Unset, str]):
25
+ terms_of_service_link (Union[Unset, str]):
26
+ version (Union[Unset, str]):
27
+ is_active (Union[Unset, bool]):
28
+ requires_reconsent (Union[Unset, bool]): If True, user will be asked to re-consent to the terms of service when
29
+ the terms of service are updated.
30
+ """
31
+
32
+ uuid: UUID
33
+ offering_uuid: UUID
34
+ offering_name: str
35
+ created: datetime.datetime
36
+ modified: datetime.datetime
37
+ terms_of_service: Union[Unset, str] = UNSET
38
+ terms_of_service_link: Union[Unset, str] = UNSET
39
+ version: Union[Unset, str] = UNSET
40
+ is_active: Union[Unset, bool] = UNSET
41
+ requires_reconsent: Union[Unset, bool] = UNSET
42
+ additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
43
+
44
+ def to_dict(self) -> dict[str, Any]:
45
+ uuid = str(self.uuid)
46
+
47
+ offering_uuid = str(self.offering_uuid)
48
+
49
+ offering_name = self.offering_name
50
+
51
+ created = self.created.isoformat()
52
+
53
+ modified = self.modified.isoformat()
54
+
55
+ terms_of_service = self.terms_of_service
56
+
57
+ terms_of_service_link = self.terms_of_service_link
58
+
59
+ version = self.version
60
+
61
+ is_active = self.is_active
62
+
63
+ requires_reconsent = self.requires_reconsent
64
+
65
+ field_dict: dict[str, Any] = {}
66
+ field_dict.update(self.additional_properties)
67
+ field_dict.update(
68
+ {
69
+ "uuid": uuid,
70
+ "offering_uuid": offering_uuid,
71
+ "offering_name": offering_name,
72
+ "created": created,
73
+ "modified": modified,
74
+ }
75
+ )
76
+ if terms_of_service is not UNSET:
77
+ field_dict["terms_of_service"] = terms_of_service
78
+ if terms_of_service_link is not UNSET:
79
+ field_dict["terms_of_service_link"] = terms_of_service_link
80
+ if version is not UNSET:
81
+ field_dict["version"] = version
82
+ if is_active is not UNSET:
83
+ field_dict["is_active"] = is_active
84
+ if requires_reconsent is not UNSET:
85
+ field_dict["requires_reconsent"] = requires_reconsent
86
+
87
+ return field_dict
88
+
89
+ @classmethod
90
+ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
91
+ d = dict(src_dict)
92
+ uuid = UUID(d.pop("uuid"))
93
+
94
+ offering_uuid = UUID(d.pop("offering_uuid"))
95
+
96
+ offering_name = d.pop("offering_name")
97
+
98
+ created = isoparse(d.pop("created"))
99
+
100
+ modified = isoparse(d.pop("modified"))
101
+
102
+ terms_of_service = d.pop("terms_of_service", UNSET)
103
+
104
+ terms_of_service_link = d.pop("terms_of_service_link", UNSET)
105
+
106
+ version = d.pop("version", UNSET)
107
+
108
+ is_active = d.pop("is_active", UNSET)
109
+
110
+ requires_reconsent = d.pop("requires_reconsent", UNSET)
111
+
112
+ offering_terms_of_service = cls(
113
+ uuid=uuid,
114
+ offering_uuid=offering_uuid,
115
+ offering_name=offering_name,
116
+ created=created,
117
+ modified=modified,
118
+ terms_of_service=terms_of_service,
119
+ terms_of_service_link=terms_of_service_link,
120
+ version=version,
121
+ is_active=is_active,
122
+ requires_reconsent=requires_reconsent,
123
+ )
124
+
125
+ offering_terms_of_service.additional_properties = d
126
+ return offering_terms_of_service
127
+
128
+ @property
129
+ def additional_keys(self) -> list[str]:
130
+ return list(self.additional_properties.keys())
131
+
132
+ def __getitem__(self, key: str) -> Any:
133
+ return self.additional_properties[key]
134
+
135
+ def __setitem__(self, key: str, value: Any) -> None:
136
+ self.additional_properties[key] = value
137
+
138
+ def __delitem__(self, key: str) -> None:
139
+ del self.additional_properties[key]
140
+
141
+ def __contains__(self, key: str) -> bool:
142
+ return key in self.additional_properties
@@ -0,0 +1,107 @@
1
+ from collections.abc import Mapping
2
+ from typing import Any, TypeVar, Union
3
+
4
+ from attrs import define as _attrs_define
5
+ from attrs import field as _attrs_field
6
+
7
+ from ..types import UNSET, Unset
8
+
9
+ T = TypeVar("T", bound="OfferingTermsOfServiceCreate")
10
+
11
+
12
+ @_attrs_define
13
+ class OfferingTermsOfServiceCreate:
14
+ """
15
+ Attributes:
16
+ offering (str):
17
+ terms_of_service (Union[Unset, str]):
18
+ terms_of_service_link (Union[Unset, str]):
19
+ version (Union[Unset, str]):
20
+ is_active (Union[Unset, bool]):
21
+ requires_reconsent (Union[Unset, bool]): If True, user will be asked to re-consent to the terms of service when
22
+ the terms of service are updated.
23
+ """
24
+
25
+ offering: str
26
+ terms_of_service: Union[Unset, str] = UNSET
27
+ terms_of_service_link: Union[Unset, str] = UNSET
28
+ version: Union[Unset, str] = UNSET
29
+ is_active: Union[Unset, bool] = UNSET
30
+ requires_reconsent: Union[Unset, bool] = UNSET
31
+ additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
32
+
33
+ def to_dict(self) -> dict[str, Any]:
34
+ offering = self.offering
35
+
36
+ terms_of_service = self.terms_of_service
37
+
38
+ terms_of_service_link = self.terms_of_service_link
39
+
40
+ version = self.version
41
+
42
+ is_active = self.is_active
43
+
44
+ requires_reconsent = self.requires_reconsent
45
+
46
+ field_dict: dict[str, Any] = {}
47
+ field_dict.update(self.additional_properties)
48
+ field_dict.update(
49
+ {
50
+ "offering": offering,
51
+ }
52
+ )
53
+ if terms_of_service is not UNSET:
54
+ field_dict["terms_of_service"] = terms_of_service
55
+ if terms_of_service_link is not UNSET:
56
+ field_dict["terms_of_service_link"] = terms_of_service_link
57
+ if version is not UNSET:
58
+ field_dict["version"] = version
59
+ if is_active is not UNSET:
60
+ field_dict["is_active"] = is_active
61
+ if requires_reconsent is not UNSET:
62
+ field_dict["requires_reconsent"] = requires_reconsent
63
+
64
+ return field_dict
65
+
66
+ @classmethod
67
+ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
68
+ d = dict(src_dict)
69
+ offering = d.pop("offering")
70
+
71
+ terms_of_service = d.pop("terms_of_service", UNSET)
72
+
73
+ terms_of_service_link = d.pop("terms_of_service_link", UNSET)
74
+
75
+ version = d.pop("version", UNSET)
76
+
77
+ is_active = d.pop("is_active", UNSET)
78
+
79
+ requires_reconsent = d.pop("requires_reconsent", UNSET)
80
+
81
+ offering_terms_of_service_create = cls(
82
+ offering=offering,
83
+ terms_of_service=terms_of_service,
84
+ terms_of_service_link=terms_of_service_link,
85
+ version=version,
86
+ is_active=is_active,
87
+ requires_reconsent=requires_reconsent,
88
+ )
89
+
90
+ offering_terms_of_service_create.additional_properties = d
91
+ return offering_terms_of_service_create
92
+
93
+ @property
94
+ def additional_keys(self) -> list[str]:
95
+ return list(self.additional_properties.keys())
96
+
97
+ def __getitem__(self, key: str) -> Any:
98
+ return self.additional_properties[key]
99
+
100
+ def __setitem__(self, key: str, value: Any) -> None:
101
+ self.additional_properties[key] = value
102
+
103
+ def __delitem__(self, key: str) -> None:
104
+ del self.additional_properties[key]
105
+
106
+ def __contains__(self, key: str) -> bool:
107
+ return key in self.additional_properties
@@ -0,0 +1,107 @@
1
+ from collections.abc import Mapping
2
+ from typing import Any, TypeVar, Union
3
+
4
+ from attrs import define as _attrs_define
5
+ from attrs import field as _attrs_field
6
+
7
+ from ..types import UNSET, Unset
8
+
9
+ T = TypeVar("T", bound="OfferingTermsOfServiceCreateRequest")
10
+
11
+
12
+ @_attrs_define
13
+ class OfferingTermsOfServiceCreateRequest:
14
+ """
15
+ Attributes:
16
+ offering (str):
17
+ terms_of_service (Union[Unset, str]):
18
+ terms_of_service_link (Union[Unset, str]):
19
+ version (Union[Unset, str]):
20
+ is_active (Union[Unset, bool]):
21
+ requires_reconsent (Union[Unset, bool]): If True, user will be asked to re-consent to the terms of service when
22
+ the terms of service are updated.
23
+ """
24
+
25
+ offering: str
26
+ terms_of_service: Union[Unset, str] = UNSET
27
+ terms_of_service_link: Union[Unset, str] = UNSET
28
+ version: Union[Unset, str] = UNSET
29
+ is_active: Union[Unset, bool] = UNSET
30
+ requires_reconsent: Union[Unset, bool] = UNSET
31
+ additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
32
+
33
+ def to_dict(self) -> dict[str, Any]:
34
+ offering = self.offering
35
+
36
+ terms_of_service = self.terms_of_service
37
+
38
+ terms_of_service_link = self.terms_of_service_link
39
+
40
+ version = self.version
41
+
42
+ is_active = self.is_active
43
+
44
+ requires_reconsent = self.requires_reconsent
45
+
46
+ field_dict: dict[str, Any] = {}
47
+ field_dict.update(self.additional_properties)
48
+ field_dict.update(
49
+ {
50
+ "offering": offering,
51
+ }
52
+ )
53
+ if terms_of_service is not UNSET:
54
+ field_dict["terms_of_service"] = terms_of_service
55
+ if terms_of_service_link is not UNSET:
56
+ field_dict["terms_of_service_link"] = terms_of_service_link
57
+ if version is not UNSET:
58
+ field_dict["version"] = version
59
+ if is_active is not UNSET:
60
+ field_dict["is_active"] = is_active
61
+ if requires_reconsent is not UNSET:
62
+ field_dict["requires_reconsent"] = requires_reconsent
63
+
64
+ return field_dict
65
+
66
+ @classmethod
67
+ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
68
+ d = dict(src_dict)
69
+ offering = d.pop("offering")
70
+
71
+ terms_of_service = d.pop("terms_of_service", UNSET)
72
+
73
+ terms_of_service_link = d.pop("terms_of_service_link", UNSET)
74
+
75
+ version = d.pop("version", UNSET)
76
+
77
+ is_active = d.pop("is_active", UNSET)
78
+
79
+ requires_reconsent = d.pop("requires_reconsent", UNSET)
80
+
81
+ offering_terms_of_service_create_request = cls(
82
+ offering=offering,
83
+ terms_of_service=terms_of_service,
84
+ terms_of_service_link=terms_of_service_link,
85
+ version=version,
86
+ is_active=is_active,
87
+ requires_reconsent=requires_reconsent,
88
+ )
89
+
90
+ offering_terms_of_service_create_request.additional_properties = d
91
+ return offering_terms_of_service_create_request
92
+
93
+ @property
94
+ def additional_keys(self) -> list[str]:
95
+ return list(self.additional_properties.keys())
96
+
97
+ def __getitem__(self, key: str) -> Any:
98
+ return self.additional_properties[key]
99
+
100
+ def __setitem__(self, key: str, value: Any) -> None:
101
+ self.additional_properties[key] = value
102
+
103
+ def __delitem__(self, key: str) -> None:
104
+ del self.additional_properties[key]
105
+
106
+ def __contains__(self, key: str) -> bool:
107
+ return key in self.additional_properties
@@ -0,0 +1,96 @@
1
+ from collections.abc import Mapping
2
+ from typing import Any, TypeVar, Union
3
+
4
+ from attrs import define as _attrs_define
5
+ from attrs import field as _attrs_field
6
+
7
+ from ..types import UNSET, Unset
8
+
9
+ T = TypeVar("T", bound="OfferingTermsOfServiceRequest")
10
+
11
+
12
+ @_attrs_define
13
+ class OfferingTermsOfServiceRequest:
14
+ """
15
+ Attributes:
16
+ terms_of_service (Union[Unset, str]):
17
+ terms_of_service_link (Union[Unset, str]):
18
+ version (Union[Unset, str]):
19
+ is_active (Union[Unset, bool]):
20
+ requires_reconsent (Union[Unset, bool]): If True, user will be asked to re-consent to the terms of service when
21
+ the terms of service are updated.
22
+ """
23
+
24
+ terms_of_service: Union[Unset, str] = UNSET
25
+ terms_of_service_link: Union[Unset, str] = UNSET
26
+ version: Union[Unset, str] = UNSET
27
+ is_active: Union[Unset, bool] = UNSET
28
+ requires_reconsent: Union[Unset, bool] = UNSET
29
+ additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
30
+
31
+ def to_dict(self) -> dict[str, Any]:
32
+ terms_of_service = self.terms_of_service
33
+
34
+ terms_of_service_link = self.terms_of_service_link
35
+
36
+ version = self.version
37
+
38
+ is_active = self.is_active
39
+
40
+ requires_reconsent = self.requires_reconsent
41
+
42
+ field_dict: dict[str, Any] = {}
43
+ field_dict.update(self.additional_properties)
44
+ field_dict.update({})
45
+ if terms_of_service is not UNSET:
46
+ field_dict["terms_of_service"] = terms_of_service
47
+ if terms_of_service_link is not UNSET:
48
+ field_dict["terms_of_service_link"] = terms_of_service_link
49
+ if version is not UNSET:
50
+ field_dict["version"] = version
51
+ if is_active is not UNSET:
52
+ field_dict["is_active"] = is_active
53
+ if requires_reconsent is not UNSET:
54
+ field_dict["requires_reconsent"] = requires_reconsent
55
+
56
+ return field_dict
57
+
58
+ @classmethod
59
+ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
60
+ d = dict(src_dict)
61
+ terms_of_service = d.pop("terms_of_service", UNSET)
62
+
63
+ terms_of_service_link = d.pop("terms_of_service_link", UNSET)
64
+
65
+ version = d.pop("version", UNSET)
66
+
67
+ is_active = d.pop("is_active", UNSET)
68
+
69
+ requires_reconsent = d.pop("requires_reconsent", UNSET)
70
+
71
+ offering_terms_of_service_request = cls(
72
+ terms_of_service=terms_of_service,
73
+ terms_of_service_link=terms_of_service_link,
74
+ version=version,
75
+ is_active=is_active,
76
+ requires_reconsent=requires_reconsent,
77
+ )
78
+
79
+ offering_terms_of_service_request.additional_properties = d
80
+ return offering_terms_of_service_request
81
+
82
+ @property
83
+ def additional_keys(self) -> list[str]:
84
+ return list(self.additional_properties.keys())
85
+
86
+ def __getitem__(self, key: str) -> Any:
87
+ return self.additional_properties[key]
88
+
89
+ def __setitem__(self, key: str, value: Any) -> None:
90
+ self.additional_properties[key] = value
91
+
92
+ def __delitem__(self, key: str) -> None:
93
+ del self.additional_properties[key]
94
+
95
+ def __contains__(self, key: str) -> bool:
96
+ return key in self.additional_properties
@@ -21,6 +21,9 @@ class OpenStackInstanceCreateOrderAttributes:
21
21
  """This mixin allows to specify list of fields to be rendered by serializer.
22
22
  It expects that request is available in serializer's context.
23
23
 
24
+ It is disabled for nested serializers (where parent is another serializer)
25
+ but remains active for list views (where parent is a ListSerializer).
26
+
24
27
  Attributes:
25
28
  name (str):
26
29
  flavor (str): The flavor to use for the instance
@@ -1,11 +1,15 @@
1
1
  from collections.abc import Mapping
2
- from typing import Any, TypeVar, Union
2
+ from typing import TYPE_CHECKING, Any, TypeVar, Union
3
3
 
4
4
  from attrs import define as _attrs_define
5
5
  from attrs import field as _attrs_field
6
6
 
7
7
  from ..types import UNSET, Unset
8
8
 
9
+ if TYPE_CHECKING:
10
+ from ..models.open_stack_nested_security_group_rules_item import OpenStackNestedSecurityGroupRulesItem
11
+
12
+
9
13
  T = TypeVar("T", bound="OpenStackNestedSecurityGroup")
10
14
 
11
15
 
@@ -14,29 +18,77 @@ class OpenStackNestedSecurityGroup:
14
18
  """
15
19
  Attributes:
16
20
  url (Union[Unset, str]):
21
+ name (Union[Unset, str]):
22
+ description (Union[Unset, str]):
23
+ state (Union[Unset, str]):
24
+ rules (Union[Unset, list['OpenStackNestedSecurityGroupRulesItem']]):
17
25
  """
18
26
 
19
27
  url: Union[Unset, str] = UNSET
28
+ name: Union[Unset, str] = UNSET
29
+ description: Union[Unset, str] = UNSET
30
+ state: Union[Unset, str] = UNSET
31
+ rules: Union[Unset, list["OpenStackNestedSecurityGroupRulesItem"]] = UNSET
20
32
  additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
21
33
 
22
34
  def to_dict(self) -> dict[str, Any]:
23
35
  url = self.url
24
36
 
37
+ name = self.name
38
+
39
+ description = self.description
40
+
41
+ state = self.state
42
+
43
+ rules: Union[Unset, list[dict[str, Any]]] = UNSET
44
+ if not isinstance(self.rules, Unset):
45
+ rules = []
46
+ for rules_item_data in self.rules:
47
+ rules_item = rules_item_data.to_dict()
48
+ rules.append(rules_item)
49
+
25
50
  field_dict: dict[str, Any] = {}
26
51
  field_dict.update(self.additional_properties)
27
52
  field_dict.update({})
28
53
  if url is not UNSET:
29
54
  field_dict["url"] = url
55
+ if name is not UNSET:
56
+ field_dict["name"] = name
57
+ if description is not UNSET:
58
+ field_dict["description"] = description
59
+ if state is not UNSET:
60
+ field_dict["state"] = state
61
+ if rules is not UNSET:
62
+ field_dict["rules"] = rules
30
63
 
31
64
  return field_dict
32
65
 
33
66
  @classmethod
34
67
  def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
68
+ from ..models.open_stack_nested_security_group_rules_item import OpenStackNestedSecurityGroupRulesItem
69
+
35
70
  d = dict(src_dict)
36
71
  url = d.pop("url", UNSET)
37
72
 
73
+ name = d.pop("name", UNSET)
74
+
75
+ description = d.pop("description", UNSET)
76
+
77
+ state = d.pop("state", UNSET)
78
+
79
+ rules = []
80
+ _rules = d.pop("rules", UNSET)
81
+ for rules_item_data in _rules or []:
82
+ rules_item = OpenStackNestedSecurityGroupRulesItem.from_dict(rules_item_data)
83
+
84
+ rules.append(rules_item)
85
+
38
86
  open_stack_nested_security_group = cls(
39
87
  url=url,
88
+ name=name,
89
+ description=description,
90
+ state=state,
91
+ rules=rules,
40
92
  )
41
93
 
42
94
  open_stack_nested_security_group.additional_properties = d