waldur-api-client 7.8.3__py3-none-any.whl → 7.8.4__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 (118) hide show
  1. waldur_api_client/api/booking_resources/booking_resources_count.py +18 -0
  2. waldur_api_client/api/booking_resources/booking_resources_list.py +18 -0
  3. waldur_api_client/api/marketplace_offering_users/marketplace_offering_users_checklist_template_count.py +125 -0
  4. waldur_api_client/api/marketplace_offering_users/marketplace_offering_users_checklist_template_retrieve.py +126 -0
  5. waldur_api_client/api/marketplace_provider_offerings/marketplace_provider_offerings_tos_stats_retrieve.py +146 -0
  6. waldur_api_client/api/marketplace_provider_resources/marketplace_provider_resources_count.py +18 -0
  7. waldur_api_client/api/marketplace_provider_resources/marketplace_provider_resources_list.py +18 -0
  8. waldur_api_client/api/marketplace_provider_resources/marketplace_provider_resources_update_options.py +168 -0
  9. waldur_api_client/api/marketplace_resources/marketplace_resources_count.py +18 -0
  10. waldur_api_client/api/marketplace_resources/marketplace_resources_list.py +18 -0
  11. waldur_api_client/api/marketplace_resources/marketplace_resources_renew.py +166 -0
  12. waldur_api_client/api/marketplace_service_providers/service_provider_checklists_summary.py +189 -0
  13. waldur_api_client/api/onboarding/__init__.py +1 -0
  14. waldur_api_client/api/onboarding/onboarding_supported_countries_retrieve.py +74 -0
  15. waldur_api_client/api/onboarding_justifications/__init__.py +1 -0
  16. waldur_api_client/api/onboarding_justifications/onboarding_justifications_attach_document.py +211 -0
  17. waldur_api_client/api/onboarding_justifications/onboarding_justifications_count.py +172 -0
  18. waldur_api_client/api/onboarding_justifications/onboarding_justifications_create.py +150 -0
  19. waldur_api_client/api/onboarding_justifications/onboarding_justifications_create_justification.py +154 -0
  20. waldur_api_client/api/onboarding_justifications/onboarding_justifications_destroy.py +89 -0
  21. waldur_api_client/api/onboarding_justifications/onboarding_justifications_list.py +175 -0
  22. waldur_api_client/api/onboarding_justifications/onboarding_justifications_partial_update.py +164 -0
  23. waldur_api_client/api/onboarding_justifications/onboarding_justifications_retrieve.py +142 -0
  24. waldur_api_client/api/onboarding_justifications/onboarding_justifications_update.py +164 -0
  25. waldur_api_client/api/onboarding_verifications/__init__.py +1 -0
  26. waldur_api_client/api/onboarding_verifications/onboarding_verifications_count.py +172 -0
  27. waldur_api_client/api/onboarding_verifications/onboarding_verifications_create.py +150 -0
  28. waldur_api_client/api/onboarding_verifications/onboarding_verifications_create_customer.py +144 -0
  29. waldur_api_client/api/onboarding_verifications/onboarding_verifications_destroy.py +89 -0
  30. waldur_api_client/api/onboarding_verifications/onboarding_verifications_list.py +175 -0
  31. waldur_api_client/api/onboarding_verifications/onboarding_verifications_partial_update.py +164 -0
  32. waldur_api_client/api/onboarding_verifications/onboarding_verifications_retrieve.py +142 -0
  33. waldur_api_client/api/onboarding_verifications/onboarding_verifications_update.py +164 -0
  34. waldur_api_client/api/onboarding_verifications/onboarding_verifications_validate_company.py +154 -0
  35. waldur_api_client/api/openstack_network_rbac_policies/openstack_network_rbac_policies_count.py +33 -0
  36. waldur_api_client/api/openstack_network_rbac_policies/openstack_network_rbac_policies_create.py +154 -0
  37. waldur_api_client/api/openstack_network_rbac_policies/openstack_network_rbac_policies_destroy.py +91 -0
  38. waldur_api_client/api/openstack_network_rbac_policies/openstack_network_rbac_policies_list.py +33 -0
  39. waldur_api_client/api/openstack_network_rbac_policies/openstack_network_rbac_policies_partial_update.py +164 -0
  40. waldur_api_client/api/openstack_network_rbac_policies/openstack_network_rbac_policies_update.py +164 -0
  41. waldur_api_client/api/openstack_networks/openstack_networks_rbac_policy_create.py +24 -22
  42. waldur_api_client/api/projects/projects_checklist_template_count.py +125 -0
  43. waldur_api_client/api/projects/projects_checklist_template_retrieve.py +126 -0
  44. waldur_api_client/api/proposal_proposals/proposal_proposals_checklist_template_count.py +125 -0
  45. waldur_api_client/api/proposal_proposals/proposal_proposals_checklist_template_retrieve.py +126 -0
  46. waldur_api_client/api/proposal_protected_calls/proposal_protected_calls_offerings_list.py +15 -0
  47. waldur_api_client/models/__init__.py +62 -4
  48. waldur_api_client/models/booking_resource.py +4 -11
  49. waldur_api_client/models/call_round.py +4 -4
  50. waldur_api_client/models/checklist_template.py +99 -0
  51. waldur_api_client/models/checklist_template_checklist.py +44 -0
  52. waldur_api_client/models/constance_settings.py +45 -0
  53. waldur_api_client/models/constance_settings_request.py +45 -0
  54. waldur_api_client/models/constance_settings_request_form.py +45 -0
  55. waldur_api_client/models/constance_settings_request_multipart.py +85 -0
  56. waldur_api_client/models/customer.py +9 -0
  57. waldur_api_client/models/customers_list_field_item.py +1 -0
  58. waldur_api_client/models/customers_retrieve_field_item.py +1 -0
  59. waldur_api_client/models/deprecated_network_rbac_policy.py +137 -0
  60. waldur_api_client/models/deprecated_network_rbac_policy_request.py +78 -0
  61. waldur_api_client/models/event_types_enum.py +1 -0
  62. waldur_api_client/models/marketplace_service_providers_projects_list_field_item.py +1 -0
  63. waldur_api_client/models/merged_plugin_options.py +18 -0
  64. waldur_api_client/models/merged_plugin_options_request.py +18 -0
  65. waldur_api_client/models/nested_round.py +5 -5
  66. waldur_api_client/models/network_rbac_policy_request.py +8 -0
  67. waldur_api_client/models/notification.py +9 -9
  68. waldur_api_client/models/{notification_context_fields.py → notification_context_schema.py} +6 -6
  69. waldur_api_client/models/notification_template_detail_serializers.py +9 -3
  70. waldur_api_client/models/offering_component.py +79 -0
  71. waldur_api_client/models/offering_component_request.py +80 -0
  72. waldur_api_client/models/onboarding_company_validation_request_request.py +88 -0
  73. waldur_api_client/models/onboarding_justification.py +183 -0
  74. waldur_api_client/models/onboarding_justification_create_request.py +68 -0
  75. waldur_api_client/models/onboarding_justification_documentation.py +108 -0
  76. waldur_api_client/models/onboarding_justification_documentation_request.py +84 -0
  77. waldur_api_client/models/onboarding_justification_documentation_request_form.py +84 -0
  78. waldur_api_client/models/onboarding_justification_documentation_request_multipart.py +98 -0
  79. waldur_api_client/models/onboarding_justification_request.py +75 -0
  80. waldur_api_client/models/onboarding_verification.py +250 -0
  81. waldur_api_client/models/onboarding_verification_request.py +128 -0
  82. waldur_api_client/models/onboarding_verification_status_enum.py +12 -0
  83. waldur_api_client/models/open_stack_create_floating_ip_request.py +20 -1
  84. waldur_api_client/models/order_create.py +4 -4
  85. waldur_api_client/models/order_details.py +4 -11
  86. waldur_api_client/models/patched_network_rbac_policy_request.py +85 -0
  87. waldur_api_client/models/patched_onboarding_justification_request.py +77 -0
  88. waldur_api_client/models/patched_onboarding_verification_request.py +128 -0
  89. waldur_api_client/models/patched_project_credit_request.py +13 -0
  90. waldur_api_client/models/patched_project_request.py +1 -2
  91. waldur_api_client/models/patched_project_request_form.py +1 -2
  92. waldur_api_client/models/patched_project_request_multipart.py +1 -2
  93. waldur_api_client/models/project.py +10 -2
  94. waldur_api_client/models/project_credit.py +13 -0
  95. waldur_api_client/models/project_credit_request.py +13 -0
  96. waldur_api_client/models/project_request.py +1 -2
  97. waldur_api_client/models/project_request_form.py +1 -2
  98. waldur_api_client/models/project_request_multipart.py +1 -2
  99. waldur_api_client/models/projects_list_field_item.py +1 -0
  100. waldur_api_client/models/projects_retrieve_field_item.py +1 -0
  101. waldur_api_client/models/protected_round.py +4 -4
  102. waldur_api_client/models/question.py +102 -0
  103. waldur_api_client/models/question_options.py +79 -0
  104. waldur_api_client/models/resource.py +4 -11
  105. waldur_api_client/models/resource_renew_request.py +83 -0
  106. waldur_api_client/models/resource_renew_request_limits.py +44 -0
  107. waldur_api_client/models/{status_enum.py → round_status.py} +1 -1
  108. waldur_api_client/models/service_provider_checklist_summary.py +98 -0
  109. waldur_api_client/models/time_series_to_s_data.py +69 -0
  110. waldur_api_client/models/to_s_consent_dashboard.py +155 -0
  111. waldur_api_client/models/update_offering_component_request.py +79 -0
  112. waldur_api_client/models/validation_decision_enum.py +10 -0
  113. waldur_api_client/models/validation_method_enum.py +8 -0
  114. waldur_api_client/models/version_adoption.py +67 -0
  115. {waldur_api_client-7.8.3.dist-info → waldur_api_client-7.8.4.dist-info}/METADATA +1 -1
  116. {waldur_api_client-7.8.3.dist-info → waldur_api_client-7.8.4.dist-info}/RECORD +118 -54
  117. {waldur_api_client-7.8.3.dist-info → waldur_api_client-7.8.4.dist-info}/WHEEL +0 -0
  118. {waldur_api_client-7.8.3.dist-info → waldur_api_client-7.8.4.dist-info}/licenses/LICENSE +0 -0
@@ -42,7 +42,7 @@ class Resource:
42
42
  OpenStack.
43
43
  provider_name (Union[Unset, str]):
44
44
  provider_uuid (Union[Unset, UUID]):
45
- provider_slug (Union[Unset, UUID]):
45
+ provider_slug (Union[Unset, str]):
46
46
  category_title (Union[Unset, str]):
47
47
  category_uuid (Union[Unset, UUID]):
48
48
  category_icon (Union[Unset, str]):
@@ -122,7 +122,7 @@ class Resource:
122
122
  offering_plugin_options: Union[Unset, Any] = UNSET
123
123
  provider_name: Union[Unset, str] = UNSET
124
124
  provider_uuid: Union[Unset, UUID] = UNSET
125
- provider_slug: Union[Unset, UUID] = UNSET
125
+ provider_slug: Union[Unset, str] = UNSET
126
126
  category_title: Union[Unset, str] = UNSET
127
127
  category_uuid: Union[Unset, UUID] = UNSET
128
128
  category_icon: Union[Unset, str] = UNSET
@@ -218,9 +218,7 @@ class Resource:
218
218
  if not isinstance(self.provider_uuid, Unset):
219
219
  provider_uuid = str(self.provider_uuid)
220
220
 
221
- provider_slug: Union[Unset, str] = UNSET
222
- if not isinstance(self.provider_slug, Unset):
223
- provider_slug = str(self.provider_slug)
221
+ provider_slug = self.provider_slug
224
222
 
225
223
  category_title = self.category_title
226
224
 
@@ -654,12 +652,7 @@ class Resource:
654
652
  else:
655
653
  provider_uuid = UUID(_provider_uuid)
656
654
 
657
- _provider_slug = d.pop("provider_slug", UNSET)
658
- provider_slug: Union[Unset, UUID]
659
- if isinstance(_provider_slug, Unset):
660
- provider_slug = UNSET
661
- else:
662
- provider_slug = UUID(_provider_slug)
655
+ provider_slug = d.pop("provider_slug", UNSET)
663
656
 
664
657
  category_title = d.pop("category_title", UNSET)
665
658
 
@@ -0,0 +1,83 @@
1
+ from collections.abc import Mapping
2
+ from typing import TYPE_CHECKING, 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
+ if TYPE_CHECKING:
10
+ from ..models.resource_renew_request_limits import ResourceRenewRequestLimits
11
+
12
+
13
+ T = TypeVar("T", bound="ResourceRenewRequest")
14
+
15
+
16
+ @_attrs_define
17
+ class ResourceRenewRequest:
18
+ """
19
+ Attributes:
20
+ extension_months (int): Number of months to extend the subscription by.
21
+ limits (Union[Unset, ResourceRenewRequestLimits]): Optional new limits for the resource. Supports upgrades only.
22
+ """
23
+
24
+ extension_months: int
25
+ limits: Union[Unset, "ResourceRenewRequestLimits"] = UNSET
26
+ additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
27
+
28
+ def to_dict(self) -> dict[str, Any]:
29
+ extension_months = self.extension_months
30
+
31
+ limits: Union[Unset, dict[str, Any]] = UNSET
32
+ if not isinstance(self.limits, Unset):
33
+ limits = self.limits.to_dict()
34
+
35
+ field_dict: dict[str, Any] = {}
36
+ field_dict.update(self.additional_properties)
37
+ field_dict.update(
38
+ {
39
+ "extension_months": extension_months,
40
+ }
41
+ )
42
+ if limits is not UNSET:
43
+ field_dict["limits"] = limits
44
+
45
+ return field_dict
46
+
47
+ @classmethod
48
+ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
49
+ from ..models.resource_renew_request_limits import ResourceRenewRequestLimits
50
+
51
+ d = dict(src_dict)
52
+ extension_months = d.pop("extension_months")
53
+
54
+ _limits = d.pop("limits", UNSET)
55
+ limits: Union[Unset, ResourceRenewRequestLimits]
56
+ if isinstance(_limits, Unset):
57
+ limits = UNSET
58
+ else:
59
+ limits = ResourceRenewRequestLimits.from_dict(_limits)
60
+
61
+ resource_renew_request = cls(
62
+ extension_months=extension_months,
63
+ limits=limits,
64
+ )
65
+
66
+ resource_renew_request.additional_properties = d
67
+ return resource_renew_request
68
+
69
+ @property
70
+ def additional_keys(self) -> list[str]:
71
+ return list(self.additional_properties.keys())
72
+
73
+ def __getitem__(self, key: str) -> Any:
74
+ return self.additional_properties[key]
75
+
76
+ def __setitem__(self, key: str, value: Any) -> None:
77
+ self.additional_properties[key] = value
78
+
79
+ def __delitem__(self, key: str) -> None:
80
+ del self.additional_properties[key]
81
+
82
+ def __contains__(self, key: str) -> bool:
83
+ return key in self.additional_properties
@@ -0,0 +1,44 @@
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
+ T = TypeVar("T", bound="ResourceRenewRequestLimits")
8
+
9
+
10
+ @_attrs_define
11
+ class ResourceRenewRequestLimits:
12
+ """Optional new limits for the resource. Supports upgrades only."""
13
+
14
+ additional_properties: dict[str, int] = _attrs_field(init=False, factory=dict)
15
+
16
+ def to_dict(self) -> dict[str, Any]:
17
+ field_dict: dict[str, Any] = {}
18
+ field_dict.update(self.additional_properties)
19
+
20
+ return field_dict
21
+
22
+ @classmethod
23
+ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
24
+ d = dict(src_dict)
25
+ resource_renew_request_limits = cls()
26
+
27
+ resource_renew_request_limits.additional_properties = d
28
+ return resource_renew_request_limits
29
+
30
+ @property
31
+ def additional_keys(self) -> list[str]:
32
+ return list(self.additional_properties.keys())
33
+
34
+ def __getitem__(self, key: str) -> int:
35
+ return self.additional_properties[key]
36
+
37
+ def __setitem__(self, key: str, value: int) -> None:
38
+ self.additional_properties[key] = value
39
+
40
+ def __delitem__(self, key: str) -> None:
41
+ del self.additional_properties[key]
42
+
43
+ def __contains__(self, key: str) -> bool:
44
+ return key in self.additional_properties
@@ -1,7 +1,7 @@
1
1
  from enum import Enum
2
2
 
3
3
 
4
- class StatusEnum(str, Enum):
4
+ class RoundStatus(str, Enum):
5
5
  ENDED = "ended"
6
6
  OPEN = "open"
7
7
  SCHEDULED = "scheduled"
@@ -0,0 +1,98 @@
1
+ from collections.abc import Mapping
2
+ from typing import Any, TypeVar, Union, cast
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="ServiceProviderChecklistSummary")
9
+
10
+
11
+ @_attrs_define
12
+ class ServiceProviderChecklistSummary:
13
+ """
14
+ Attributes:
15
+ checklist_uuid (UUID):
16
+ checklist_name (str):
17
+ questions_count (int):
18
+ offerings_count (int):
19
+ category_name (Union[None, str]):
20
+ """
21
+
22
+ checklist_uuid: UUID
23
+ checklist_name: str
24
+ questions_count: int
25
+ offerings_count: int
26
+ category_name: Union[None, str]
27
+ additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
28
+
29
+ def to_dict(self) -> dict[str, Any]:
30
+ checklist_uuid = str(self.checklist_uuid)
31
+
32
+ checklist_name = self.checklist_name
33
+
34
+ questions_count = self.questions_count
35
+
36
+ offerings_count = self.offerings_count
37
+
38
+ category_name: Union[None, str]
39
+ category_name = self.category_name
40
+
41
+ field_dict: dict[str, Any] = {}
42
+ field_dict.update(self.additional_properties)
43
+ field_dict.update(
44
+ {
45
+ "checklist_uuid": checklist_uuid,
46
+ "checklist_name": checklist_name,
47
+ "questions_count": questions_count,
48
+ "offerings_count": offerings_count,
49
+ "category_name": category_name,
50
+ }
51
+ )
52
+
53
+ return field_dict
54
+
55
+ @classmethod
56
+ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
57
+ d = dict(src_dict)
58
+ checklist_uuid = UUID(d.pop("checklist_uuid"))
59
+
60
+ checklist_name = d.pop("checklist_name")
61
+
62
+ questions_count = d.pop("questions_count")
63
+
64
+ offerings_count = d.pop("offerings_count")
65
+
66
+ def _parse_category_name(data: object) -> Union[None, str]:
67
+ if data is None:
68
+ return data
69
+ return cast(Union[None, str], data)
70
+
71
+ category_name = _parse_category_name(d.pop("category_name"))
72
+
73
+ service_provider_checklist_summary = cls(
74
+ checklist_uuid=checklist_uuid,
75
+ checklist_name=checklist_name,
76
+ questions_count=questions_count,
77
+ offerings_count=offerings_count,
78
+ category_name=category_name,
79
+ )
80
+
81
+ service_provider_checklist_summary.additional_properties = d
82
+ return service_provider_checklist_summary
83
+
84
+ @property
85
+ def additional_keys(self) -> list[str]:
86
+ return list(self.additional_properties.keys())
87
+
88
+ def __getitem__(self, key: str) -> Any:
89
+ return self.additional_properties[key]
90
+
91
+ def __setitem__(self, key: str, value: Any) -> None:
92
+ self.additional_properties[key] = value
93
+
94
+ def __delitem__(self, key: str) -> None:
95
+ del self.additional_properties[key]
96
+
97
+ def __contains__(self, key: str) -> bool:
98
+ return key in self.additional_properties
@@ -0,0 +1,69 @@
1
+ import datetime
2
+ from collections.abc import Mapping
3
+ from typing import Any, TypeVar
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
+ T = TypeVar("T", bound="TimeSeriesToSData")
10
+
11
+
12
+ @_attrs_define
13
+ class TimeSeriesToSData:
14
+ """
15
+ Attributes:
16
+ date (datetime.date):
17
+ count (int):
18
+ """
19
+
20
+ date: datetime.date
21
+ count: int
22
+ additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
23
+
24
+ def to_dict(self) -> dict[str, Any]:
25
+ date = self.date.isoformat()
26
+
27
+ count = self.count
28
+
29
+ field_dict: dict[str, Any] = {}
30
+ field_dict.update(self.additional_properties)
31
+ field_dict.update(
32
+ {
33
+ "date": date,
34
+ "count": count,
35
+ }
36
+ )
37
+
38
+ return field_dict
39
+
40
+ @classmethod
41
+ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
42
+ d = dict(src_dict)
43
+ date = isoparse(d.pop("date")).date()
44
+
45
+ count = d.pop("count")
46
+
47
+ time_series_to_s_data = cls(
48
+ date=date,
49
+ count=count,
50
+ )
51
+
52
+ time_series_to_s_data.additional_properties = d
53
+ return time_series_to_s_data
54
+
55
+ @property
56
+ def additional_keys(self) -> list[str]:
57
+ return list(self.additional_properties.keys())
58
+
59
+ def __getitem__(self, key: str) -> Any:
60
+ return self.additional_properties[key]
61
+
62
+ def __setitem__(self, key: str, value: Any) -> None:
63
+ self.additional_properties[key] = value
64
+
65
+ def __delitem__(self, key: str) -> None:
66
+ del self.additional_properties[key]
67
+
68
+ def __contains__(self, key: str) -> bool:
69
+ return key in self.additional_properties
@@ -0,0 +1,155 @@
1
+ from collections.abc import Mapping
2
+ from typing import TYPE_CHECKING, Any, TypeVar
3
+
4
+ from attrs import define as _attrs_define
5
+ from attrs import field as _attrs_field
6
+
7
+ if TYPE_CHECKING:
8
+ from ..models.time_series_to_s_data import TimeSeriesToSData
9
+ from ..models.version_adoption import VersionAdoption
10
+
11
+
12
+ T = TypeVar("T", bound="ToSConsentDashboard")
13
+
14
+
15
+ @_attrs_define
16
+ class ToSConsentDashboard:
17
+ """
18
+ Attributes:
19
+ active_users_count (int):
20
+ total_users_count (int):
21
+ active_users_percentage (float):
22
+ accepted_consents_count (int):
23
+ revoked_consents_count (int):
24
+ total_consents_count (int):
25
+ revoked_consents_over_time (list['TimeSeriesToSData']):
26
+ tos_version_adoption (list['VersionAdoption']):
27
+ active_users_over_time (list['TimeSeriesToSData']):
28
+ """
29
+
30
+ active_users_count: int
31
+ total_users_count: int
32
+ active_users_percentage: float
33
+ accepted_consents_count: int
34
+ revoked_consents_count: int
35
+ total_consents_count: int
36
+ revoked_consents_over_time: list["TimeSeriesToSData"]
37
+ tos_version_adoption: list["VersionAdoption"]
38
+ active_users_over_time: list["TimeSeriesToSData"]
39
+ additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
40
+
41
+ def to_dict(self) -> dict[str, Any]:
42
+ active_users_count = self.active_users_count
43
+
44
+ total_users_count = self.total_users_count
45
+
46
+ active_users_percentage = self.active_users_percentage
47
+
48
+ accepted_consents_count = self.accepted_consents_count
49
+
50
+ revoked_consents_count = self.revoked_consents_count
51
+
52
+ total_consents_count = self.total_consents_count
53
+
54
+ revoked_consents_over_time = []
55
+ for revoked_consents_over_time_item_data in self.revoked_consents_over_time:
56
+ revoked_consents_over_time_item = revoked_consents_over_time_item_data.to_dict()
57
+ revoked_consents_over_time.append(revoked_consents_over_time_item)
58
+
59
+ tos_version_adoption = []
60
+ for tos_version_adoption_item_data in self.tos_version_adoption:
61
+ tos_version_adoption_item = tos_version_adoption_item_data.to_dict()
62
+ tos_version_adoption.append(tos_version_adoption_item)
63
+
64
+ active_users_over_time = []
65
+ for active_users_over_time_item_data in self.active_users_over_time:
66
+ active_users_over_time_item = active_users_over_time_item_data.to_dict()
67
+ active_users_over_time.append(active_users_over_time_item)
68
+
69
+ field_dict: dict[str, Any] = {}
70
+ field_dict.update(self.additional_properties)
71
+ field_dict.update(
72
+ {
73
+ "active_users_count": active_users_count,
74
+ "total_users_count": total_users_count,
75
+ "active_users_percentage": active_users_percentage,
76
+ "accepted_consents_count": accepted_consents_count,
77
+ "revoked_consents_count": revoked_consents_count,
78
+ "total_consents_count": total_consents_count,
79
+ "revoked_consents_over_time": revoked_consents_over_time,
80
+ "tos_version_adoption": tos_version_adoption,
81
+ "active_users_over_time": active_users_over_time,
82
+ }
83
+ )
84
+
85
+ return field_dict
86
+
87
+ @classmethod
88
+ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
89
+ from ..models.time_series_to_s_data import TimeSeriesToSData
90
+ from ..models.version_adoption import VersionAdoption
91
+
92
+ d = dict(src_dict)
93
+ active_users_count = d.pop("active_users_count")
94
+
95
+ total_users_count = d.pop("total_users_count")
96
+
97
+ active_users_percentage = d.pop("active_users_percentage")
98
+
99
+ accepted_consents_count = d.pop("accepted_consents_count")
100
+
101
+ revoked_consents_count = d.pop("revoked_consents_count")
102
+
103
+ total_consents_count = d.pop("total_consents_count")
104
+
105
+ revoked_consents_over_time = []
106
+ _revoked_consents_over_time = d.pop("revoked_consents_over_time")
107
+ for revoked_consents_over_time_item_data in _revoked_consents_over_time:
108
+ revoked_consents_over_time_item = TimeSeriesToSData.from_dict(revoked_consents_over_time_item_data)
109
+
110
+ revoked_consents_over_time.append(revoked_consents_over_time_item)
111
+
112
+ tos_version_adoption = []
113
+ _tos_version_adoption = d.pop("tos_version_adoption")
114
+ for tos_version_adoption_item_data in _tos_version_adoption:
115
+ tos_version_adoption_item = VersionAdoption.from_dict(tos_version_adoption_item_data)
116
+
117
+ tos_version_adoption.append(tos_version_adoption_item)
118
+
119
+ active_users_over_time = []
120
+ _active_users_over_time = d.pop("active_users_over_time")
121
+ for active_users_over_time_item_data in _active_users_over_time:
122
+ active_users_over_time_item = TimeSeriesToSData.from_dict(active_users_over_time_item_data)
123
+
124
+ active_users_over_time.append(active_users_over_time_item)
125
+
126
+ to_s_consent_dashboard = cls(
127
+ active_users_count=active_users_count,
128
+ total_users_count=total_users_count,
129
+ active_users_percentage=active_users_percentage,
130
+ accepted_consents_count=accepted_consents_count,
131
+ revoked_consents_count=revoked_consents_count,
132
+ total_consents_count=total_consents_count,
133
+ revoked_consents_over_time=revoked_consents_over_time,
134
+ tos_version_adoption=tos_version_adoption,
135
+ active_users_over_time=active_users_over_time,
136
+ )
137
+
138
+ to_s_consent_dashboard.additional_properties = d
139
+ return to_s_consent_dashboard
140
+
141
+ @property
142
+ def additional_keys(self) -> list[str]:
143
+ return list(self.additional_properties.keys())
144
+
145
+ def __getitem__(self, key: str) -> Any:
146
+ return self.additional_properties[key]
147
+
148
+ def __setitem__(self, key: str, value: Any) -> None:
149
+ self.additional_properties[key] = value
150
+
151
+ def __delitem__(self, key: str) -> None:
152
+ del self.additional_properties[key]
153
+
154
+ def __contains__(self, key: str) -> bool:
155
+ return key in self.additional_properties
@@ -32,6 +32,10 @@ class UpdateOfferingComponentRequest:
32
32
  max_available_limit (Union[None, Unset, int]):
33
33
  is_boolean (Union[Unset, bool]):
34
34
  default_limit (Union[None, Unset, int]):
35
+ is_prepaid (Union[Unset, bool]):
36
+ overage_component (Union[None, UUID, Unset]):
37
+ min_prepaid_duration (Union[None, Unset, int]):
38
+ max_prepaid_duration (Union[None, Unset, int]):
35
39
  """
36
40
 
37
41
  uuid: UUID
@@ -49,6 +53,10 @@ class UpdateOfferingComponentRequest:
49
53
  max_available_limit: Union[None, Unset, int] = UNSET
50
54
  is_boolean: Union[Unset, bool] = UNSET
51
55
  default_limit: Union[None, Unset, int] = UNSET
56
+ is_prepaid: Union[Unset, bool] = UNSET
57
+ overage_component: Union[None, UUID, Unset] = UNSET
58
+ min_prepaid_duration: Union[None, Unset, int] = UNSET
59
+ max_prepaid_duration: Union[None, Unset, int] = UNSET
52
60
  additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
53
61
 
54
62
  def to_dict(self) -> dict[str, Any]:
@@ -110,6 +118,28 @@ class UpdateOfferingComponentRequest:
110
118
  else:
111
119
  default_limit = self.default_limit
112
120
 
121
+ is_prepaid = self.is_prepaid
122
+
123
+ overage_component: Union[None, Unset, str]
124
+ if isinstance(self.overage_component, Unset):
125
+ overage_component = UNSET
126
+ elif isinstance(self.overage_component, UUID):
127
+ overage_component = str(self.overage_component)
128
+ else:
129
+ overage_component = self.overage_component
130
+
131
+ min_prepaid_duration: Union[None, Unset, int]
132
+ if isinstance(self.min_prepaid_duration, Unset):
133
+ min_prepaid_duration = UNSET
134
+ else:
135
+ min_prepaid_duration = self.min_prepaid_duration
136
+
137
+ max_prepaid_duration: Union[None, Unset, int]
138
+ if isinstance(self.max_prepaid_duration, Unset):
139
+ max_prepaid_duration = UNSET
140
+ else:
141
+ max_prepaid_duration = self.max_prepaid_duration
142
+
113
143
  field_dict: dict[str, Any] = {}
114
144
  field_dict.update(self.additional_properties)
115
145
  field_dict.update(
@@ -142,6 +172,14 @@ class UpdateOfferingComponentRequest:
142
172
  field_dict["is_boolean"] = is_boolean
143
173
  if default_limit is not UNSET:
144
174
  field_dict["default_limit"] = default_limit
175
+ if is_prepaid is not UNSET:
176
+ field_dict["is_prepaid"] = is_prepaid
177
+ if overage_component is not UNSET:
178
+ field_dict["overage_component"] = overage_component
179
+ if min_prepaid_duration is not UNSET:
180
+ field_dict["min_prepaid_duration"] = min_prepaid_duration
181
+ if max_prepaid_duration is not UNSET:
182
+ field_dict["max_prepaid_duration"] = max_prepaid_duration
145
183
 
146
184
  return field_dict
147
185
 
@@ -236,6 +274,43 @@ class UpdateOfferingComponentRequest:
236
274
 
237
275
  default_limit = _parse_default_limit(d.pop("default_limit", UNSET))
238
276
 
277
+ is_prepaid = d.pop("is_prepaid", UNSET)
278
+
279
+ def _parse_overage_component(data: object) -> Union[None, UUID, Unset]:
280
+ if data is None:
281
+ return data
282
+ if isinstance(data, Unset):
283
+ return data
284
+ try:
285
+ if not isinstance(data, str):
286
+ raise TypeError()
287
+ overage_component_type_0 = UUID(data)
288
+
289
+ return overage_component_type_0
290
+ except: # noqa: E722
291
+ pass
292
+ return cast(Union[None, UUID, Unset], data)
293
+
294
+ overage_component = _parse_overage_component(d.pop("overage_component", UNSET))
295
+
296
+ def _parse_min_prepaid_duration(data: object) -> Union[None, Unset, int]:
297
+ if data is None:
298
+ return data
299
+ if isinstance(data, Unset):
300
+ return data
301
+ return cast(Union[None, Unset, int], data)
302
+
303
+ min_prepaid_duration = _parse_min_prepaid_duration(d.pop("min_prepaid_duration", UNSET))
304
+
305
+ def _parse_max_prepaid_duration(data: object) -> Union[None, Unset, int]:
306
+ if data is None:
307
+ return data
308
+ if isinstance(data, Unset):
309
+ return data
310
+ return cast(Union[None, Unset, int], data)
311
+
312
+ max_prepaid_duration = _parse_max_prepaid_duration(d.pop("max_prepaid_duration", UNSET))
313
+
239
314
  update_offering_component_request = cls(
240
315
  uuid=uuid,
241
316
  billing_type=billing_type,
@@ -252,6 +327,10 @@ class UpdateOfferingComponentRequest:
252
327
  max_available_limit=max_available_limit,
253
328
  is_boolean=is_boolean,
254
329
  default_limit=default_limit,
330
+ is_prepaid=is_prepaid,
331
+ overage_component=overage_component,
332
+ min_prepaid_duration=min_prepaid_duration,
333
+ max_prepaid_duration=max_prepaid_duration,
255
334
  )
256
335
 
257
336
  update_offering_component_request.additional_properties = d
@@ -0,0 +1,10 @@
1
+ from enum import Enum
2
+
3
+
4
+ class ValidationDecisionEnum(str, Enum):
5
+ APPROVED = "approved"
6
+ PENDING = "pending"
7
+ REJECTED = "rejected"
8
+
9
+ def __str__(self) -> str:
10
+ return str(self.value)
@@ -0,0 +1,8 @@
1
+ from enum import Enum
2
+
3
+
4
+ class ValidationMethodEnum(str, Enum):
5
+ ARIREGISTER = "ariregister"
6
+
7
+ def __str__(self) -> str:
8
+ return str(self.value)