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,123 @@
1
+ import datetime
2
+ from collections.abc import Mapping
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
+ from dateutil.parser import isoparse
8
+
9
+ from ..models.remote_resource_sync_status_remote_state_enum import RemoteResourceSyncStatusRemoteStateEnum
10
+ from ..models.resource_state import ResourceState
11
+ from ..models.sync_status_enum import SyncStatusEnum
12
+
13
+ T = TypeVar("T", bound="RemoteResourceSyncStatus")
14
+
15
+
16
+ @_attrs_define
17
+ class RemoteResourceSyncStatus:
18
+ """
19
+ Attributes:
20
+ local_state (ResourceState):
21
+ remote_state (Union[None, RemoteResourceSyncStatusRemoteStateEnum]): Remote resource state
22
+ sync_status (SyncStatusEnum):
23
+ last_sync (Union[None, datetime.datetime]): Last sync timestamp
24
+ """
25
+
26
+ local_state: ResourceState
27
+ remote_state: Union[None, RemoteResourceSyncStatusRemoteStateEnum]
28
+ sync_status: SyncStatusEnum
29
+ last_sync: Union[None, datetime.datetime]
30
+ additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
31
+
32
+ def to_dict(self) -> dict[str, Any]:
33
+ local_state = self.local_state.value
34
+
35
+ remote_state: Union[None, int]
36
+ if isinstance(self.remote_state, RemoteResourceSyncStatusRemoteStateEnum):
37
+ remote_state = self.remote_state.value
38
+ else:
39
+ remote_state = self.remote_state
40
+
41
+ sync_status = self.sync_status.value
42
+
43
+ last_sync: Union[None, str]
44
+ if isinstance(self.last_sync, datetime.datetime):
45
+ last_sync = self.last_sync.isoformat()
46
+ else:
47
+ last_sync = self.last_sync
48
+
49
+ field_dict: dict[str, Any] = {}
50
+ field_dict.update(self.additional_properties)
51
+ field_dict.update(
52
+ {
53
+ "local_state": local_state,
54
+ "remote_state": remote_state,
55
+ "sync_status": sync_status,
56
+ "last_sync": last_sync,
57
+ }
58
+ )
59
+
60
+ return field_dict
61
+
62
+ @classmethod
63
+ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
64
+ d = dict(src_dict)
65
+ local_state = ResourceState(d.pop("local_state"))
66
+
67
+ def _parse_remote_state(data: object) -> Union[None, RemoteResourceSyncStatusRemoteStateEnum]:
68
+ if data is None:
69
+ return data
70
+ try:
71
+ if not isinstance(data, int):
72
+ raise TypeError()
73
+ remote_state_type_0 = RemoteResourceSyncStatusRemoteStateEnum(data)
74
+
75
+ return remote_state_type_0
76
+ except: # noqa: E722
77
+ pass
78
+ return cast(Union[None, RemoteResourceSyncStatusRemoteStateEnum], data)
79
+
80
+ remote_state = _parse_remote_state(d.pop("remote_state"))
81
+
82
+ sync_status = SyncStatusEnum(d.pop("sync_status"))
83
+
84
+ def _parse_last_sync(data: object) -> Union[None, datetime.datetime]:
85
+ if data is None:
86
+ return data
87
+ try:
88
+ if not isinstance(data, str):
89
+ raise TypeError()
90
+ last_sync_type_0 = isoparse(data)
91
+
92
+ return last_sync_type_0
93
+ except: # noqa: E722
94
+ pass
95
+ return cast(Union[None, datetime.datetime], data)
96
+
97
+ last_sync = _parse_last_sync(d.pop("last_sync"))
98
+
99
+ remote_resource_sync_status = cls(
100
+ local_state=local_state,
101
+ remote_state=remote_state,
102
+ sync_status=sync_status,
103
+ last_sync=last_sync,
104
+ )
105
+
106
+ remote_resource_sync_status.additional_properties = d
107
+ return remote_resource_sync_status
108
+
109
+ @property
110
+ def additional_keys(self) -> list[str]:
111
+ return list(self.additional_properties.keys())
112
+
113
+ def __getitem__(self, key: str) -> Any:
114
+ return self.additional_properties[key]
115
+
116
+ def __setitem__(self, key: str, value: Any) -> None:
117
+ self.additional_properties[key] = value
118
+
119
+ def __delitem__(self, key: str) -> None:
120
+ del self.additional_properties[key]
121
+
122
+ def __contains__(self, key: str) -> bool:
123
+ return key in self.additional_properties
@@ -0,0 +1,13 @@
1
+ from enum import IntEnum
2
+
3
+
4
+ class RemoteResourceSyncStatusRemoteStateEnum(IntEnum):
5
+ VALUE_1 = 1
6
+ VALUE_2 = 2
7
+ VALUE_3 = 3
8
+ VALUE_4 = 4
9
+ VALUE_5 = 5
10
+ VALUE_6 = 6
11
+
12
+ def __str__(self) -> str:
13
+ return str(self.value)
@@ -0,0 +1,85 @@
1
+ from collections.abc import Mapping
2
+ from typing import Any, TypeVar
3
+
4
+ from attrs import define as _attrs_define
5
+ from attrs import field as _attrs_field
6
+
7
+ from ..models.sync_status_enum import SyncStatusEnum
8
+
9
+ T = TypeVar("T", bound="RemoteResourceTeamMember")
10
+
11
+
12
+ @_attrs_define
13
+ class RemoteResourceTeamMember:
14
+ """
15
+ Attributes:
16
+ full_name (str): Full name
17
+ local_role (str): Local role
18
+ remote_role (str): Remote role
19
+ sync_status (SyncStatusEnum):
20
+ """
21
+
22
+ full_name: str
23
+ local_role: str
24
+ remote_role: str
25
+ sync_status: SyncStatusEnum
26
+ additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
27
+
28
+ def to_dict(self) -> dict[str, Any]:
29
+ full_name = self.full_name
30
+
31
+ local_role = self.local_role
32
+
33
+ remote_role = self.remote_role
34
+
35
+ sync_status = self.sync_status.value
36
+
37
+ field_dict: dict[str, Any] = {}
38
+ field_dict.update(self.additional_properties)
39
+ field_dict.update(
40
+ {
41
+ "full_name": full_name,
42
+ "local_role": local_role,
43
+ "remote_role": remote_role,
44
+ "sync_status": sync_status,
45
+ }
46
+ )
47
+
48
+ return field_dict
49
+
50
+ @classmethod
51
+ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
52
+ d = dict(src_dict)
53
+ full_name = d.pop("full_name")
54
+
55
+ local_role = d.pop("local_role")
56
+
57
+ remote_role = d.pop("remote_role")
58
+
59
+ sync_status = SyncStatusEnum(d.pop("sync_status"))
60
+
61
+ remote_resource_team_member = cls(
62
+ full_name=full_name,
63
+ local_role=local_role,
64
+ remote_role=remote_role,
65
+ sync_status=sync_status,
66
+ )
67
+
68
+ remote_resource_team_member.additional_properties = d
69
+ return remote_resource_team_member
70
+
71
+ @property
72
+ def additional_keys(self) -> list[str]:
73
+ return list(self.additional_properties.keys())
74
+
75
+ def __getitem__(self, key: str) -> Any:
76
+ return self.additional_properties[key]
77
+
78
+ def __setitem__(self, key: str, value: Any) -> None:
79
+ self.additional_properties[key] = value
80
+
81
+ def __delitem__(self, key: str) -> None:
82
+ del self.additional_properties[key]
83
+
84
+ def __contains__(self, key: str) -> bool:
85
+ return key in self.additional_properties
@@ -36,7 +36,6 @@ class Resource:
36
36
  offering_image (Union[Unset, str]):
37
37
  offering_thumbnail (Union[Unset, str]):
38
38
  offering_type (Union[Unset, str]):
39
- offering_terms_of_service (Union[Unset, str]):
40
39
  offering_shared (Union[Unset, bool]): Accessible to all customers.
41
40
  offering_billable (Union[Unset, bool]): Purchase and usage is invoiced.
42
41
  offering_plugin_options (Union[Unset, Any]): Public data used by specific plugin, such as storage mode for
@@ -107,6 +106,8 @@ class Resource:
107
106
  service_settings_uuid (Union[Unset, UUID]):
108
107
  project_slug (Union[Unset, str]):
109
108
  customer_slug (Union[Unset, str]):
109
+ user_requires_reconsent (Union[Unset, bool]): Check if the current user needs to re-consent for this resource's
110
+ offering.
110
111
  """
111
112
 
112
113
  offering: Union[Unset, str] = UNSET
@@ -116,7 +117,6 @@ class Resource:
116
117
  offering_image: Union[Unset, str] = UNSET
117
118
  offering_thumbnail: Union[Unset, str] = UNSET
118
119
  offering_type: Union[Unset, str] = UNSET
119
- offering_terms_of_service: Union[Unset, str] = UNSET
120
120
  offering_shared: Union[Unset, bool] = UNSET
121
121
  offering_billable: Union[Unset, bool] = UNSET
122
122
  offering_plugin_options: Union[Unset, Any] = UNSET
@@ -184,6 +184,7 @@ class Resource:
184
184
  service_settings_uuid: Union[Unset, UUID] = UNSET
185
185
  project_slug: Union[Unset, str] = UNSET
186
186
  customer_slug: Union[Unset, str] = UNSET
187
+ user_requires_reconsent: Union[Unset, bool] = UNSET
187
188
  additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
188
189
 
189
190
  def to_dict(self) -> dict[str, Any]:
@@ -205,8 +206,6 @@ class Resource:
205
206
 
206
207
  offering_type = self.offering_type
207
208
 
208
- offering_terms_of_service = self.offering_terms_of_service
209
-
210
209
  offering_shared = self.offering_shared
211
210
 
212
211
  offering_billable = self.offering_billable
@@ -451,6 +450,8 @@ class Resource:
451
450
 
452
451
  customer_slug = self.customer_slug
453
452
 
453
+ user_requires_reconsent = self.user_requires_reconsent
454
+
454
455
  field_dict: dict[str, Any] = {}
455
456
  field_dict.update(self.additional_properties)
456
457
  field_dict.update({})
@@ -468,8 +469,6 @@ class Resource:
468
469
  field_dict["offering_thumbnail"] = offering_thumbnail
469
470
  if offering_type is not UNSET:
470
471
  field_dict["offering_type"] = offering_type
471
- if offering_terms_of_service is not UNSET:
472
- field_dict["offering_terms_of_service"] = offering_terms_of_service
473
472
  if offering_shared is not UNSET:
474
473
  field_dict["offering_shared"] = offering_shared
475
474
  if offering_billable is not UNSET:
@@ -604,6 +603,8 @@ class Resource:
604
603
  field_dict["project_slug"] = project_slug
605
604
  if customer_slug is not UNSET:
606
605
  field_dict["customer_slug"] = customer_slug
606
+ if user_requires_reconsent is not UNSET:
607
+ field_dict["user_requires_reconsent"] = user_requires_reconsent
607
608
 
608
609
  return field_dict
609
610
 
@@ -638,8 +639,6 @@ class Resource:
638
639
 
639
640
  offering_type = d.pop("offering_type", UNSET)
640
641
 
641
- offering_terms_of_service = d.pop("offering_terms_of_service", UNSET)
642
-
643
642
  offering_shared = d.pop("offering_shared", UNSET)
644
643
 
645
644
  offering_billable = d.pop("offering_billable", UNSET)
@@ -1014,6 +1013,8 @@ class Resource:
1014
1013
 
1015
1014
  customer_slug = d.pop("customer_slug", UNSET)
1016
1015
 
1016
+ user_requires_reconsent = d.pop("user_requires_reconsent", UNSET)
1017
+
1017
1018
  resource = cls(
1018
1019
  offering=offering,
1019
1020
  offering_name=offering_name,
@@ -1022,7 +1023,6 @@ class Resource:
1022
1023
  offering_image=offering_image,
1023
1024
  offering_thumbnail=offering_thumbnail,
1024
1025
  offering_type=offering_type,
1025
- offering_terms_of_service=offering_terms_of_service,
1026
1026
  offering_shared=offering_shared,
1027
1027
  offering_billable=offering_billable,
1028
1028
  offering_plugin_options=offering_plugin_options,
@@ -1090,6 +1090,7 @@ class Resource:
1090
1090
  service_settings_uuid=service_settings_uuid,
1091
1091
  project_slug=project_slug,
1092
1092
  customer_slug=customer_slug,
1093
+ user_requires_reconsent=user_requires_reconsent,
1093
1094
  )
1094
1095
 
1095
1096
  resource.additional_properties = d
@@ -24,6 +24,7 @@ class ServiceProvider:
24
24
  uuid (Union[Unset, UUID]):
25
25
  created (Union[Unset, datetime.datetime]):
26
26
  description (Union[Unset, str]):
27
+ enable_notifications (Union[Unset, bool]):
27
28
  customer (Union[Unset, str]):
28
29
  customer_name (Union[Unset, str]):
29
30
  customer_uuid (Union[Unset, UUID]):
@@ -41,6 +42,7 @@ class ServiceProvider:
41
42
  uuid: Union[Unset, UUID] = UNSET
42
43
  created: Union[Unset, datetime.datetime] = UNSET
43
44
  description: Union[Unset, str] = UNSET
45
+ enable_notifications: Union[Unset, bool] = UNSET
44
46
  customer: Union[Unset, str] = UNSET
45
47
  customer_name: Union[Unset, str] = UNSET
46
48
  customer_uuid: Union[Unset, UUID] = UNSET
@@ -67,6 +69,8 @@ class ServiceProvider:
67
69
 
68
70
  description = self.description
69
71
 
72
+ enable_notifications = self.enable_notifications
73
+
70
74
  customer = self.customer
71
75
 
72
76
  customer_name = self.customer_name
@@ -111,6 +115,8 @@ class ServiceProvider:
111
115
  field_dict["created"] = created
112
116
  if description is not UNSET:
113
117
  field_dict["description"] = description
118
+ if enable_notifications is not UNSET:
119
+ field_dict["enable_notifications"] = enable_notifications
114
120
  if customer is not UNSET:
115
121
  field_dict["customer"] = customer
116
122
  if customer_name is not UNSET:
@@ -159,6 +165,8 @@ class ServiceProvider:
159
165
 
160
166
  description = d.pop("description", UNSET)
161
167
 
168
+ enable_notifications = d.pop("enable_notifications", UNSET)
169
+
162
170
  customer = d.pop("customer", UNSET)
163
171
 
164
172
  customer_name = d.pop("customer_name", UNSET)
@@ -203,6 +211,7 @@ class ServiceProvider:
203
211
  uuid=uuid,
204
212
  created=created,
205
213
  description=description,
214
+ enable_notifications=enable_notifications,
206
215
  customer=customer,
207
216
  customer_name=customer_name,
208
217
  customer_uuid=customer_uuid,
@@ -14,6 +14,9 @@ class SlurmInvoicesSlurmPackageCreateOrderAttributes:
14
14
  """This mixin allows to specify list of fields to be rendered by serializer.
15
15
  It expects that request is available in serializer's context.
16
16
 
17
+ It is disabled for nested serializers (where parent is another serializer)
18
+ but remains active for list views (where parent is a ListSerializer).
19
+
17
20
  Attributes:
18
21
  name (str):
19
22
  description (Union[Unset, str]):
@@ -0,0 +1,10 @@
1
+ from enum import Enum
2
+
3
+
4
+ class SyncStatusEnum(str, Enum):
5
+ IN_SYNC = "in_sync"
6
+ OUT_OF_SYNC = "out_of_sync"
7
+ SYNC_FAILED = "sync_failed"
8
+
9
+ def __str__(self) -> str:
10
+ return str(self.value)
@@ -0,0 +1,202 @@
1
+ import datetime
2
+ from collections.abc import Mapping
3
+ from typing import Any, TypeVar, Union, cast
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="UserOfferingConsent")
13
+
14
+
15
+ @_attrs_define
16
+ class UserOfferingConsent:
17
+ """
18
+ Attributes:
19
+ uuid (UUID):
20
+ user_uuid (UUID):
21
+ offering_uuid (UUID):
22
+ agreement_date (datetime.datetime):
23
+ revocation_date (Union[None, datetime.datetime]):
24
+ created (datetime.datetime):
25
+ user_username (str): Required. 128 characters or fewer. Lowercase letters, numbers and @/./+/-/_ characters
26
+ user_full_name (str):
27
+ user_email (str):
28
+ offering_name (str):
29
+ offering_slug (str):
30
+ offering_url (str):
31
+ modified (datetime.datetime):
32
+ has_consent (bool):
33
+ requires_reconsent (bool):
34
+ version (Union[Unset, str]):
35
+ """
36
+
37
+ uuid: UUID
38
+ user_uuid: UUID
39
+ offering_uuid: UUID
40
+ agreement_date: datetime.datetime
41
+ revocation_date: Union[None, datetime.datetime]
42
+ created: datetime.datetime
43
+ user_username: str
44
+ user_full_name: str
45
+ user_email: str
46
+ offering_name: str
47
+ offering_slug: str
48
+ offering_url: str
49
+ modified: datetime.datetime
50
+ has_consent: bool
51
+ requires_reconsent: bool
52
+ version: Union[Unset, str] = UNSET
53
+ additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
54
+
55
+ def to_dict(self) -> dict[str, Any]:
56
+ uuid = str(self.uuid)
57
+
58
+ user_uuid = str(self.user_uuid)
59
+
60
+ offering_uuid = str(self.offering_uuid)
61
+
62
+ agreement_date = self.agreement_date.isoformat()
63
+
64
+ revocation_date: Union[None, str]
65
+ if isinstance(self.revocation_date, datetime.datetime):
66
+ revocation_date = self.revocation_date.isoformat()
67
+ else:
68
+ revocation_date = self.revocation_date
69
+
70
+ created = self.created.isoformat()
71
+
72
+ user_username = self.user_username
73
+
74
+ user_full_name = self.user_full_name
75
+
76
+ user_email = self.user_email
77
+
78
+ offering_name = self.offering_name
79
+
80
+ offering_slug = self.offering_slug
81
+
82
+ offering_url = self.offering_url
83
+
84
+ modified = self.modified.isoformat()
85
+
86
+ has_consent = self.has_consent
87
+
88
+ requires_reconsent = self.requires_reconsent
89
+
90
+ version = self.version
91
+
92
+ field_dict: dict[str, Any] = {}
93
+ field_dict.update(self.additional_properties)
94
+ field_dict.update(
95
+ {
96
+ "uuid": uuid,
97
+ "user_uuid": user_uuid,
98
+ "offering_uuid": offering_uuid,
99
+ "agreement_date": agreement_date,
100
+ "revocation_date": revocation_date,
101
+ "created": created,
102
+ "user_username": user_username,
103
+ "user_full_name": user_full_name,
104
+ "user_email": user_email,
105
+ "offering_name": offering_name,
106
+ "offering_slug": offering_slug,
107
+ "offering_url": offering_url,
108
+ "modified": modified,
109
+ "has_consent": has_consent,
110
+ "requires_reconsent": requires_reconsent,
111
+ }
112
+ )
113
+ if version is not UNSET:
114
+ field_dict["version"] = version
115
+
116
+ return field_dict
117
+
118
+ @classmethod
119
+ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
120
+ d = dict(src_dict)
121
+ uuid = UUID(d.pop("uuid"))
122
+
123
+ user_uuid = UUID(d.pop("user_uuid"))
124
+
125
+ offering_uuid = UUID(d.pop("offering_uuid"))
126
+
127
+ agreement_date = isoparse(d.pop("agreement_date"))
128
+
129
+ def _parse_revocation_date(data: object) -> Union[None, datetime.datetime]:
130
+ if data is None:
131
+ return data
132
+ try:
133
+ if not isinstance(data, str):
134
+ raise TypeError()
135
+ revocation_date_type_0 = isoparse(data)
136
+
137
+ return revocation_date_type_0
138
+ except: # noqa: E722
139
+ pass
140
+ return cast(Union[None, datetime.datetime], data)
141
+
142
+ revocation_date = _parse_revocation_date(d.pop("revocation_date"))
143
+
144
+ created = isoparse(d.pop("created"))
145
+
146
+ user_username = d.pop("user_username")
147
+
148
+ user_full_name = d.pop("user_full_name")
149
+
150
+ user_email = d.pop("user_email")
151
+
152
+ offering_name = d.pop("offering_name")
153
+
154
+ offering_slug = d.pop("offering_slug")
155
+
156
+ offering_url = d.pop("offering_url")
157
+
158
+ modified = isoparse(d.pop("modified"))
159
+
160
+ has_consent = d.pop("has_consent")
161
+
162
+ requires_reconsent = d.pop("requires_reconsent")
163
+
164
+ version = d.pop("version", UNSET)
165
+
166
+ user_offering_consent = cls(
167
+ uuid=uuid,
168
+ user_uuid=user_uuid,
169
+ offering_uuid=offering_uuid,
170
+ agreement_date=agreement_date,
171
+ revocation_date=revocation_date,
172
+ created=created,
173
+ user_username=user_username,
174
+ user_full_name=user_full_name,
175
+ user_email=user_email,
176
+ offering_name=offering_name,
177
+ offering_slug=offering_slug,
178
+ offering_url=offering_url,
179
+ modified=modified,
180
+ has_consent=has_consent,
181
+ requires_reconsent=requires_reconsent,
182
+ version=version,
183
+ )
184
+
185
+ user_offering_consent.additional_properties = d
186
+ return user_offering_consent
187
+
188
+ @property
189
+ def additional_keys(self) -> list[str]:
190
+ return list(self.additional_properties.keys())
191
+
192
+ def __getitem__(self, key: str) -> Any:
193
+ return self.additional_properties[key]
194
+
195
+ def __setitem__(self, key: str, value: Any) -> None:
196
+ self.additional_properties[key] = value
197
+
198
+ def __delitem__(self, key: str) -> None:
199
+ del self.additional_properties[key]
200
+
201
+ def __contains__(self, key: str) -> bool:
202
+ return key in self.additional_properties
@@ -0,0 +1,60 @@
1
+ from collections.abc import Mapping
2
+ from typing import Any, TypeVar
3
+ from uuid import UUID
4
+
5
+ from attrs import define as _attrs_define
6
+ from attrs import field as _attrs_field
7
+
8
+ T = TypeVar("T", bound="UserOfferingConsentCreate")
9
+
10
+
11
+ @_attrs_define
12
+ class UserOfferingConsentCreate:
13
+ """
14
+ Attributes:
15
+ offering (UUID):
16
+ """
17
+
18
+ offering: UUID
19
+ additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
20
+
21
+ def to_dict(self) -> dict[str, Any]:
22
+ offering = str(self.offering)
23
+
24
+ field_dict: dict[str, Any] = {}
25
+ field_dict.update(self.additional_properties)
26
+ field_dict.update(
27
+ {
28
+ "offering": offering,
29
+ }
30
+ )
31
+
32
+ return field_dict
33
+
34
+ @classmethod
35
+ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
36
+ d = dict(src_dict)
37
+ offering = UUID(d.pop("offering"))
38
+
39
+ user_offering_consent_create = cls(
40
+ offering=offering,
41
+ )
42
+
43
+ user_offering_consent_create.additional_properties = d
44
+ return user_offering_consent_create
45
+
46
+ @property
47
+ def additional_keys(self) -> list[str]:
48
+ return list(self.additional_properties.keys())
49
+
50
+ def __getitem__(self, key: str) -> Any:
51
+ return self.additional_properties[key]
52
+
53
+ def __setitem__(self, key: str, value: Any) -> None:
54
+ self.additional_properties[key] = value
55
+
56
+ def __delitem__(self, key: str) -> None:
57
+ del self.additional_properties[key]
58
+
59
+ def __contains__(self, key: str) -> bool:
60
+ return key in self.additional_properties