policyengine-api-simulation-client 0.20260112.78__py3-none-any.whl → 0.20260114.79__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.
- policyengine_api_simulation_client/__init__.py +1 -1
- policyengine_api_simulation_client/api/default/get_country_versions_versions_country_get.py +172 -0
- policyengine_api_simulation_client/api/default/get_job_status_jobs_job_id_get.py +204 -0
- policyengine_api_simulation_client/api/default/{started_ping_started_get.py → health_health_get.py} +27 -21
- policyengine_api_simulation_client/api/default/{alive_ping_alive_get.py → list_versions_versions_get.py} +27 -29
- policyengine_api_simulation_client/api/default/ping_ping_post.py +8 -8
- policyengine_api_simulation_client/api/default/{simulate_simulate_economy_comparison_post.py → submit_simulation_simulate_economy_comparison_post.py} +51 -27
- policyengine_api_simulation_client/models/__init__.py +17 -103
- policyengine_api_simulation_client/models/{baseline_reform_values.py → get_country_versions_versions_country_get_response_get_country_versions_versions_country_get.py} +6 -29
- policyengine_api_simulation_client/models/{labor_supply_response_relative_lsr.py → health_health_get_response_health_health_get.py} +5 -5
- policyengine_api_simulation_client/models/job_status_response.py +122 -0
- policyengine_api_simulation_client/models/{simulation_options_data_type_1.py → job_status_response_result_type_0.py} +5 -5
- policyengine_api_simulation_client/models/{program_specific_impact.py → job_submit_response.py} +41 -24
- policyengine_api_simulation_client/models/{parameter_change_dict.py → list_versions_versions_get_response_list_versions_versions_get.py} +6 -13
- policyengine_api_simulation_client/models/ping_request.py +2 -1
- policyengine_api_simulation_client/models/ping_response.py +2 -1
- policyengine_api_simulation_client/models/{probe_status.py → simulation_request.py} +24 -31
- {policyengine_api_simulation_client-0.20260112.78.dist-info → policyengine_api_simulation_client-0.20260114.79.dist-info}/METADATA +4 -4
- policyengine_api_simulation_client-0.20260114.79.dist-info/RECORD +28 -0
- policyengine_api_simulation_client/models/age_group_baseline_reform_values.py +0 -91
- policyengine_api_simulation_client/models/budgetary_impact.py +0 -101
- policyengine_api_simulation_client/models/cliff_impact.py +0 -75
- policyengine_api_simulation_client/models/cliff_impact_in_simulation.py +0 -69
- policyengine_api_simulation_client/models/decile_impact.py +0 -77
- policyengine_api_simulation_client/models/decile_impact_average.py +0 -46
- policyengine_api_simulation_client/models/decile_impact_relative.py +0 -46
- policyengine_api_simulation_client/models/economy_comparison.py +0 -366
- policyengine_api_simulation_client/models/economy_comparison_detailed_budget_type_0.py +0 -59
- policyengine_api_simulation_client/models/gender_baseline_reform_values.py +0 -75
- policyengine_api_simulation_client/models/health_status.py +0 -83
- policyengine_api_simulation_client/models/hours_response.py +0 -93
- policyengine_api_simulation_client/models/inequality_impact.py +0 -83
- policyengine_api_simulation_client/models/intra_decile_impact.py +0 -77
- policyengine_api_simulation_client/models/intra_decile_impact_all.py +0 -46
- policyengine_api_simulation_client/models/intra_decile_impact_deciles.py +0 -53
- policyengine_api_simulation_client/models/intra_wealth_decile_impact_with_values.py +0 -77
- policyengine_api_simulation_client/models/intra_wealth_decile_impact_with_values_all.py +0 -46
- policyengine_api_simulation_client/models/intra_wealth_decile_impact_with_values_deciles.py +0 -53
- policyengine_api_simulation_client/models/labor_supply_response.py +0 -119
- policyengine_api_simulation_client/models/labor_supply_response_decile.py +0 -63
- policyengine_api_simulation_client/models/labor_supply_response_decile_additional_property.py +0 -65
- policyengine_api_simulation_client/models/labor_supply_response_decile_additional_property_additional_property.py +0 -46
- policyengine_api_simulation_client/models/parametric_reform.py +0 -80
- policyengine_api_simulation_client/models/poverty_gender_breakdown.py +0 -75
- policyengine_api_simulation_client/models/poverty_impact.py +0 -75
- policyengine_api_simulation_client/models/poverty_racial_breakdown_with_values.py +0 -67
- policyengine_api_simulation_client/models/racial_baseline_reform_values.py +0 -91
- policyengine_api_simulation_client/models/simulation_options.py +0 -309
- policyengine_api_simulation_client/models/simulation_options_country.py +0 -9
- policyengine_api_simulation_client/models/simulation_options_scope.py +0 -9
- policyengine_api_simulation_client/models/system_status.py +0 -91
- policyengine_api_simulation_client/models/uk_constituency_breakdown_by_constituency.py +0 -85
- policyengine_api_simulation_client/models/uk_constituency_breakdown_with_values.py +0 -85
- policyengine_api_simulation_client/models/uk_constituency_breakdown_with_values_by_constituency.py +0 -59
- policyengine_api_simulation_client/models/uk_constituency_breakdown_with_values_outcomes_by_region.py +0 -67
- policyengine_api_simulation_client/models/uk_constituency_breakdown_with_values_outcomes_by_region_additional_property.py +0 -46
- policyengine_api_simulation_client/models/uk_local_authority_breakdown_by_local_authority.py +0 -85
- policyengine_api_simulation_client/models/uk_local_authority_breakdown_with_values.py +0 -71
- policyengine_api_simulation_client/models/uk_local_authority_breakdown_with_values_by_local_authority.py +0 -59
- policyengine_api_simulation_client/models/wealth_decile_impact_with_values.py +0 -77
- policyengine_api_simulation_client/models/wealth_decile_impact_with_values_average.py +0 -46
- policyengine_api_simulation_client/models/wealth_decile_impact_with_values_relative.py +0 -46
- policyengine_api_simulation_client-0.20260112.78.dist-info/RECORD +0 -68
- {policyengine_api_simulation_client-0.20260112.78.dist-info → policyengine_api_simulation_client-0.20260114.79.dist-info}/WHEEL +0 -0
|
@@ -1,77 +0,0 @@
|
|
|
1
|
-
from __future__ import annotations
|
|
2
|
-
|
|
3
|
-
from collections.abc import Mapping
|
|
4
|
-
from typing import TYPE_CHECKING, Any, TypeVar
|
|
5
|
-
|
|
6
|
-
from attrs import define as _attrs_define
|
|
7
|
-
from attrs import field as _attrs_field
|
|
8
|
-
|
|
9
|
-
if TYPE_CHECKING:
|
|
10
|
-
from ..models.decile_impact_average import DecileImpactAverage
|
|
11
|
-
from ..models.decile_impact_relative import DecileImpactRelative
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
T = TypeVar("T", bound="DecileImpact")
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
@_attrs_define
|
|
18
|
-
class DecileImpact:
|
|
19
|
-
"""
|
|
20
|
-
Attributes:
|
|
21
|
-
relative (DecileImpactRelative):
|
|
22
|
-
average (DecileImpactAverage):
|
|
23
|
-
"""
|
|
24
|
-
|
|
25
|
-
relative: DecileImpactRelative
|
|
26
|
-
average: DecileImpactAverage
|
|
27
|
-
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
|
|
28
|
-
|
|
29
|
-
def to_dict(self) -> dict[str, Any]:
|
|
30
|
-
relative = self.relative.to_dict()
|
|
31
|
-
|
|
32
|
-
average = self.average.to_dict()
|
|
33
|
-
|
|
34
|
-
field_dict: dict[str, Any] = {}
|
|
35
|
-
field_dict.update(self.additional_properties)
|
|
36
|
-
field_dict.update(
|
|
37
|
-
{
|
|
38
|
-
"relative": relative,
|
|
39
|
-
"average": average,
|
|
40
|
-
}
|
|
41
|
-
)
|
|
42
|
-
|
|
43
|
-
return field_dict
|
|
44
|
-
|
|
45
|
-
@classmethod
|
|
46
|
-
def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
|
|
47
|
-
from ..models.decile_impact_average import DecileImpactAverage
|
|
48
|
-
from ..models.decile_impact_relative import DecileImpactRelative
|
|
49
|
-
|
|
50
|
-
d = dict(src_dict)
|
|
51
|
-
relative = DecileImpactRelative.from_dict(d.pop("relative"))
|
|
52
|
-
|
|
53
|
-
average = DecileImpactAverage.from_dict(d.pop("average"))
|
|
54
|
-
|
|
55
|
-
decile_impact = cls(
|
|
56
|
-
relative=relative,
|
|
57
|
-
average=average,
|
|
58
|
-
)
|
|
59
|
-
|
|
60
|
-
decile_impact.additional_properties = d
|
|
61
|
-
return decile_impact
|
|
62
|
-
|
|
63
|
-
@property
|
|
64
|
-
def additional_keys(self) -> list[str]:
|
|
65
|
-
return list(self.additional_properties.keys())
|
|
66
|
-
|
|
67
|
-
def __getitem__(self, key: str) -> Any:
|
|
68
|
-
return self.additional_properties[key]
|
|
69
|
-
|
|
70
|
-
def __setitem__(self, key: str, value: Any) -> None:
|
|
71
|
-
self.additional_properties[key] = value
|
|
72
|
-
|
|
73
|
-
def __delitem__(self, key: str) -> None:
|
|
74
|
-
del self.additional_properties[key]
|
|
75
|
-
|
|
76
|
-
def __contains__(self, key: str) -> bool:
|
|
77
|
-
return key in self.additional_properties
|
|
@@ -1,46 +0,0 @@
|
|
|
1
|
-
from __future__ import annotations
|
|
2
|
-
|
|
3
|
-
from collections.abc import Mapping
|
|
4
|
-
from typing import Any, TypeVar
|
|
5
|
-
|
|
6
|
-
from attrs import define as _attrs_define
|
|
7
|
-
from attrs import field as _attrs_field
|
|
8
|
-
|
|
9
|
-
T = TypeVar("T", bound="DecileImpactAverage")
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
@_attrs_define
|
|
13
|
-
class DecileImpactAverage:
|
|
14
|
-
""" """
|
|
15
|
-
|
|
16
|
-
additional_properties: dict[str, float] = _attrs_field(init=False, factory=dict)
|
|
17
|
-
|
|
18
|
-
def to_dict(self) -> dict[str, Any]:
|
|
19
|
-
field_dict: dict[str, Any] = {}
|
|
20
|
-
field_dict.update(self.additional_properties)
|
|
21
|
-
|
|
22
|
-
return field_dict
|
|
23
|
-
|
|
24
|
-
@classmethod
|
|
25
|
-
def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
|
|
26
|
-
d = dict(src_dict)
|
|
27
|
-
decile_impact_average = cls()
|
|
28
|
-
|
|
29
|
-
decile_impact_average.additional_properties = d
|
|
30
|
-
return decile_impact_average
|
|
31
|
-
|
|
32
|
-
@property
|
|
33
|
-
def additional_keys(self) -> list[str]:
|
|
34
|
-
return list(self.additional_properties.keys())
|
|
35
|
-
|
|
36
|
-
def __getitem__(self, key: str) -> float:
|
|
37
|
-
return self.additional_properties[key]
|
|
38
|
-
|
|
39
|
-
def __setitem__(self, key: str, value: float) -> None:
|
|
40
|
-
self.additional_properties[key] = value
|
|
41
|
-
|
|
42
|
-
def __delitem__(self, key: str) -> None:
|
|
43
|
-
del self.additional_properties[key]
|
|
44
|
-
|
|
45
|
-
def __contains__(self, key: str) -> bool:
|
|
46
|
-
return key in self.additional_properties
|
|
@@ -1,46 +0,0 @@
|
|
|
1
|
-
from __future__ import annotations
|
|
2
|
-
|
|
3
|
-
from collections.abc import Mapping
|
|
4
|
-
from typing import Any, TypeVar
|
|
5
|
-
|
|
6
|
-
from attrs import define as _attrs_define
|
|
7
|
-
from attrs import field as _attrs_field
|
|
8
|
-
|
|
9
|
-
T = TypeVar("T", bound="DecileImpactRelative")
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
@_attrs_define
|
|
13
|
-
class DecileImpactRelative:
|
|
14
|
-
""" """
|
|
15
|
-
|
|
16
|
-
additional_properties: dict[str, float] = _attrs_field(init=False, factory=dict)
|
|
17
|
-
|
|
18
|
-
def to_dict(self) -> dict[str, Any]:
|
|
19
|
-
field_dict: dict[str, Any] = {}
|
|
20
|
-
field_dict.update(self.additional_properties)
|
|
21
|
-
|
|
22
|
-
return field_dict
|
|
23
|
-
|
|
24
|
-
@classmethod
|
|
25
|
-
def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
|
|
26
|
-
d = dict(src_dict)
|
|
27
|
-
decile_impact_relative = cls()
|
|
28
|
-
|
|
29
|
-
decile_impact_relative.additional_properties = d
|
|
30
|
-
return decile_impact_relative
|
|
31
|
-
|
|
32
|
-
@property
|
|
33
|
-
def additional_keys(self) -> list[str]:
|
|
34
|
-
return list(self.additional_properties.keys())
|
|
35
|
-
|
|
36
|
-
def __getitem__(self, key: str) -> float:
|
|
37
|
-
return self.additional_properties[key]
|
|
38
|
-
|
|
39
|
-
def __setitem__(self, key: str, value: float) -> None:
|
|
40
|
-
self.additional_properties[key] = value
|
|
41
|
-
|
|
42
|
-
def __delitem__(self, key: str) -> None:
|
|
43
|
-
del self.additional_properties[key]
|
|
44
|
-
|
|
45
|
-
def __contains__(self, key: str) -> bool:
|
|
46
|
-
return key in self.additional_properties
|
|
@@ -1,366 +0,0 @@
|
|
|
1
|
-
from __future__ import annotations
|
|
2
|
-
|
|
3
|
-
from collections.abc import Mapping
|
|
4
|
-
from typing import TYPE_CHECKING, Any, TypeVar, cast
|
|
5
|
-
|
|
6
|
-
from attrs import define as _attrs_define
|
|
7
|
-
from attrs import field as _attrs_field
|
|
8
|
-
|
|
9
|
-
from ..types import UNSET, Unset
|
|
10
|
-
|
|
11
|
-
if TYPE_CHECKING:
|
|
12
|
-
from ..models.budgetary_impact import BudgetaryImpact
|
|
13
|
-
from ..models.cliff_impact import CliffImpact
|
|
14
|
-
from ..models.decile_impact import DecileImpact
|
|
15
|
-
from ..models.economy_comparison_detailed_budget_type_0 import EconomyComparisonDetailedBudgetType0
|
|
16
|
-
from ..models.inequality_impact import InequalityImpact
|
|
17
|
-
from ..models.intra_decile_impact import IntraDecileImpact
|
|
18
|
-
from ..models.intra_wealth_decile_impact_with_values import IntraWealthDecileImpactWithValues
|
|
19
|
-
from ..models.labor_supply_response import LaborSupplyResponse
|
|
20
|
-
from ..models.poverty_gender_breakdown import PovertyGenderBreakdown
|
|
21
|
-
from ..models.poverty_impact import PovertyImpact
|
|
22
|
-
from ..models.poverty_racial_breakdown_with_values import PovertyRacialBreakdownWithValues
|
|
23
|
-
from ..models.uk_constituency_breakdown_with_values import UKConstituencyBreakdownWithValues
|
|
24
|
-
from ..models.uk_local_authority_breakdown_with_values import UKLocalAuthorityBreakdownWithValues
|
|
25
|
-
from ..models.wealth_decile_impact_with_values import WealthDecileImpactWithValues
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
T = TypeVar("T", bound="EconomyComparison")
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
@_attrs_define
|
|
32
|
-
class EconomyComparison:
|
|
33
|
-
"""
|
|
34
|
-
Attributes:
|
|
35
|
-
budget (BudgetaryImpact):
|
|
36
|
-
detailed_budget (EconomyComparisonDetailedBudgetType0 | None):
|
|
37
|
-
decile (DecileImpact):
|
|
38
|
-
inequality (InequalityImpact):
|
|
39
|
-
poverty (PovertyImpact):
|
|
40
|
-
poverty_by_gender (PovertyGenderBreakdown):
|
|
41
|
-
poverty_by_race (None | PovertyRacialBreakdownWithValues):
|
|
42
|
-
intra_decile (IntraDecileImpact):
|
|
43
|
-
wealth_decile (None | WealthDecileImpactWithValues):
|
|
44
|
-
intra_wealth_decile (IntraWealthDecileImpactWithValues | None):
|
|
45
|
-
labor_supply_response (LaborSupplyResponse):
|
|
46
|
-
constituency_impact (None | UKConstituencyBreakdownWithValues):
|
|
47
|
-
local_authority_impact (None | UKLocalAuthorityBreakdownWithValues):
|
|
48
|
-
cliff_impact (CliffImpact | None):
|
|
49
|
-
model_version (None | str | Unset):
|
|
50
|
-
data_version (None | str | Unset):
|
|
51
|
-
"""
|
|
52
|
-
|
|
53
|
-
budget: BudgetaryImpact
|
|
54
|
-
detailed_budget: EconomyComparisonDetailedBudgetType0 | None
|
|
55
|
-
decile: DecileImpact
|
|
56
|
-
inequality: InequalityImpact
|
|
57
|
-
poverty: PovertyImpact
|
|
58
|
-
poverty_by_gender: PovertyGenderBreakdown
|
|
59
|
-
poverty_by_race: None | PovertyRacialBreakdownWithValues
|
|
60
|
-
intra_decile: IntraDecileImpact
|
|
61
|
-
wealth_decile: None | WealthDecileImpactWithValues
|
|
62
|
-
intra_wealth_decile: IntraWealthDecileImpactWithValues | None
|
|
63
|
-
labor_supply_response: LaborSupplyResponse
|
|
64
|
-
constituency_impact: None | UKConstituencyBreakdownWithValues
|
|
65
|
-
local_authority_impact: None | UKLocalAuthorityBreakdownWithValues
|
|
66
|
-
cliff_impact: CliffImpact | None
|
|
67
|
-
model_version: None | str | Unset = UNSET
|
|
68
|
-
data_version: None | str | Unset = UNSET
|
|
69
|
-
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
|
|
70
|
-
|
|
71
|
-
def to_dict(self) -> dict[str, Any]:
|
|
72
|
-
from ..models.cliff_impact import CliffImpact
|
|
73
|
-
from ..models.economy_comparison_detailed_budget_type_0 import EconomyComparisonDetailedBudgetType0
|
|
74
|
-
from ..models.intra_wealth_decile_impact_with_values import IntraWealthDecileImpactWithValues
|
|
75
|
-
from ..models.poverty_racial_breakdown_with_values import PovertyRacialBreakdownWithValues
|
|
76
|
-
from ..models.uk_constituency_breakdown_with_values import UKConstituencyBreakdownWithValues
|
|
77
|
-
from ..models.uk_local_authority_breakdown_with_values import UKLocalAuthorityBreakdownWithValues
|
|
78
|
-
from ..models.wealth_decile_impact_with_values import WealthDecileImpactWithValues
|
|
79
|
-
|
|
80
|
-
budget = self.budget.to_dict()
|
|
81
|
-
|
|
82
|
-
detailed_budget: dict[str, Any] | None
|
|
83
|
-
if isinstance(self.detailed_budget, EconomyComparisonDetailedBudgetType0):
|
|
84
|
-
detailed_budget = self.detailed_budget.to_dict()
|
|
85
|
-
else:
|
|
86
|
-
detailed_budget = self.detailed_budget
|
|
87
|
-
|
|
88
|
-
decile = self.decile.to_dict()
|
|
89
|
-
|
|
90
|
-
inequality = self.inequality.to_dict()
|
|
91
|
-
|
|
92
|
-
poverty = self.poverty.to_dict()
|
|
93
|
-
|
|
94
|
-
poverty_by_gender = self.poverty_by_gender.to_dict()
|
|
95
|
-
|
|
96
|
-
poverty_by_race: dict[str, Any] | None
|
|
97
|
-
if isinstance(self.poverty_by_race, PovertyRacialBreakdownWithValues):
|
|
98
|
-
poverty_by_race = self.poverty_by_race.to_dict()
|
|
99
|
-
else:
|
|
100
|
-
poverty_by_race = self.poverty_by_race
|
|
101
|
-
|
|
102
|
-
intra_decile = self.intra_decile.to_dict()
|
|
103
|
-
|
|
104
|
-
wealth_decile: dict[str, Any] | None
|
|
105
|
-
if isinstance(self.wealth_decile, WealthDecileImpactWithValues):
|
|
106
|
-
wealth_decile = self.wealth_decile.to_dict()
|
|
107
|
-
else:
|
|
108
|
-
wealth_decile = self.wealth_decile
|
|
109
|
-
|
|
110
|
-
intra_wealth_decile: dict[str, Any] | None
|
|
111
|
-
if isinstance(self.intra_wealth_decile, IntraWealthDecileImpactWithValues):
|
|
112
|
-
intra_wealth_decile = self.intra_wealth_decile.to_dict()
|
|
113
|
-
else:
|
|
114
|
-
intra_wealth_decile = self.intra_wealth_decile
|
|
115
|
-
|
|
116
|
-
labor_supply_response = self.labor_supply_response.to_dict()
|
|
117
|
-
|
|
118
|
-
constituency_impact: dict[str, Any] | None
|
|
119
|
-
if isinstance(self.constituency_impact, UKConstituencyBreakdownWithValues):
|
|
120
|
-
constituency_impact = self.constituency_impact.to_dict()
|
|
121
|
-
else:
|
|
122
|
-
constituency_impact = self.constituency_impact
|
|
123
|
-
|
|
124
|
-
local_authority_impact: dict[str, Any] | None
|
|
125
|
-
if isinstance(self.local_authority_impact, UKLocalAuthorityBreakdownWithValues):
|
|
126
|
-
local_authority_impact = self.local_authority_impact.to_dict()
|
|
127
|
-
else:
|
|
128
|
-
local_authority_impact = self.local_authority_impact
|
|
129
|
-
|
|
130
|
-
cliff_impact: dict[str, Any] | None
|
|
131
|
-
if isinstance(self.cliff_impact, CliffImpact):
|
|
132
|
-
cliff_impact = self.cliff_impact.to_dict()
|
|
133
|
-
else:
|
|
134
|
-
cliff_impact = self.cliff_impact
|
|
135
|
-
|
|
136
|
-
model_version: None | str | Unset
|
|
137
|
-
if isinstance(self.model_version, Unset):
|
|
138
|
-
model_version = UNSET
|
|
139
|
-
else:
|
|
140
|
-
model_version = self.model_version
|
|
141
|
-
|
|
142
|
-
data_version: None | str | Unset
|
|
143
|
-
if isinstance(self.data_version, Unset):
|
|
144
|
-
data_version = UNSET
|
|
145
|
-
else:
|
|
146
|
-
data_version = self.data_version
|
|
147
|
-
|
|
148
|
-
field_dict: dict[str, Any] = {}
|
|
149
|
-
field_dict.update(self.additional_properties)
|
|
150
|
-
field_dict.update(
|
|
151
|
-
{
|
|
152
|
-
"budget": budget,
|
|
153
|
-
"detailed_budget": detailed_budget,
|
|
154
|
-
"decile": decile,
|
|
155
|
-
"inequality": inequality,
|
|
156
|
-
"poverty": poverty,
|
|
157
|
-
"poverty_by_gender": poverty_by_gender,
|
|
158
|
-
"poverty_by_race": poverty_by_race,
|
|
159
|
-
"intra_decile": intra_decile,
|
|
160
|
-
"wealth_decile": wealth_decile,
|
|
161
|
-
"intra_wealth_decile": intra_wealth_decile,
|
|
162
|
-
"labor_supply_response": labor_supply_response,
|
|
163
|
-
"constituency_impact": constituency_impact,
|
|
164
|
-
"local_authority_impact": local_authority_impact,
|
|
165
|
-
"cliff_impact": cliff_impact,
|
|
166
|
-
}
|
|
167
|
-
)
|
|
168
|
-
if model_version is not UNSET:
|
|
169
|
-
field_dict["model_version"] = model_version
|
|
170
|
-
if data_version is not UNSET:
|
|
171
|
-
field_dict["data_version"] = data_version
|
|
172
|
-
|
|
173
|
-
return field_dict
|
|
174
|
-
|
|
175
|
-
@classmethod
|
|
176
|
-
def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
|
|
177
|
-
from ..models.budgetary_impact import BudgetaryImpact
|
|
178
|
-
from ..models.cliff_impact import CliffImpact
|
|
179
|
-
from ..models.decile_impact import DecileImpact
|
|
180
|
-
from ..models.economy_comparison_detailed_budget_type_0 import EconomyComparisonDetailedBudgetType0
|
|
181
|
-
from ..models.inequality_impact import InequalityImpact
|
|
182
|
-
from ..models.intra_decile_impact import IntraDecileImpact
|
|
183
|
-
from ..models.intra_wealth_decile_impact_with_values import IntraWealthDecileImpactWithValues
|
|
184
|
-
from ..models.labor_supply_response import LaborSupplyResponse
|
|
185
|
-
from ..models.poverty_gender_breakdown import PovertyGenderBreakdown
|
|
186
|
-
from ..models.poverty_impact import PovertyImpact
|
|
187
|
-
from ..models.poverty_racial_breakdown_with_values import PovertyRacialBreakdownWithValues
|
|
188
|
-
from ..models.uk_constituency_breakdown_with_values import UKConstituencyBreakdownWithValues
|
|
189
|
-
from ..models.uk_local_authority_breakdown_with_values import UKLocalAuthorityBreakdownWithValues
|
|
190
|
-
from ..models.wealth_decile_impact_with_values import WealthDecileImpactWithValues
|
|
191
|
-
|
|
192
|
-
d = dict(src_dict)
|
|
193
|
-
budget = BudgetaryImpact.from_dict(d.pop("budget"))
|
|
194
|
-
|
|
195
|
-
def _parse_detailed_budget(data: object) -> EconomyComparisonDetailedBudgetType0 | None:
|
|
196
|
-
if data is None:
|
|
197
|
-
return data
|
|
198
|
-
try:
|
|
199
|
-
if not isinstance(data, dict):
|
|
200
|
-
raise TypeError()
|
|
201
|
-
detailed_budget_type_0 = EconomyComparisonDetailedBudgetType0.from_dict(data)
|
|
202
|
-
|
|
203
|
-
return detailed_budget_type_0
|
|
204
|
-
except (TypeError, ValueError, AttributeError, KeyError):
|
|
205
|
-
pass
|
|
206
|
-
return cast(EconomyComparisonDetailedBudgetType0 | None, data)
|
|
207
|
-
|
|
208
|
-
detailed_budget = _parse_detailed_budget(d.pop("detailed_budget"))
|
|
209
|
-
|
|
210
|
-
decile = DecileImpact.from_dict(d.pop("decile"))
|
|
211
|
-
|
|
212
|
-
inequality = InequalityImpact.from_dict(d.pop("inequality"))
|
|
213
|
-
|
|
214
|
-
poverty = PovertyImpact.from_dict(d.pop("poverty"))
|
|
215
|
-
|
|
216
|
-
poverty_by_gender = PovertyGenderBreakdown.from_dict(d.pop("poverty_by_gender"))
|
|
217
|
-
|
|
218
|
-
def _parse_poverty_by_race(data: object) -> None | PovertyRacialBreakdownWithValues:
|
|
219
|
-
if data is None:
|
|
220
|
-
return data
|
|
221
|
-
try:
|
|
222
|
-
if not isinstance(data, dict):
|
|
223
|
-
raise TypeError()
|
|
224
|
-
poverty_by_race_type_0 = PovertyRacialBreakdownWithValues.from_dict(data)
|
|
225
|
-
|
|
226
|
-
return poverty_by_race_type_0
|
|
227
|
-
except (TypeError, ValueError, AttributeError, KeyError):
|
|
228
|
-
pass
|
|
229
|
-
return cast(None | PovertyRacialBreakdownWithValues, data)
|
|
230
|
-
|
|
231
|
-
poverty_by_race = _parse_poverty_by_race(d.pop("poverty_by_race"))
|
|
232
|
-
|
|
233
|
-
intra_decile = IntraDecileImpact.from_dict(d.pop("intra_decile"))
|
|
234
|
-
|
|
235
|
-
def _parse_wealth_decile(data: object) -> None | WealthDecileImpactWithValues:
|
|
236
|
-
if data is None:
|
|
237
|
-
return data
|
|
238
|
-
try:
|
|
239
|
-
if not isinstance(data, dict):
|
|
240
|
-
raise TypeError()
|
|
241
|
-
wealth_decile_type_0 = WealthDecileImpactWithValues.from_dict(data)
|
|
242
|
-
|
|
243
|
-
return wealth_decile_type_0
|
|
244
|
-
except (TypeError, ValueError, AttributeError, KeyError):
|
|
245
|
-
pass
|
|
246
|
-
return cast(None | WealthDecileImpactWithValues, data)
|
|
247
|
-
|
|
248
|
-
wealth_decile = _parse_wealth_decile(d.pop("wealth_decile"))
|
|
249
|
-
|
|
250
|
-
def _parse_intra_wealth_decile(data: object) -> IntraWealthDecileImpactWithValues | None:
|
|
251
|
-
if data is None:
|
|
252
|
-
return data
|
|
253
|
-
try:
|
|
254
|
-
if not isinstance(data, dict):
|
|
255
|
-
raise TypeError()
|
|
256
|
-
intra_wealth_decile_type_0 = IntraWealthDecileImpactWithValues.from_dict(data)
|
|
257
|
-
|
|
258
|
-
return intra_wealth_decile_type_0
|
|
259
|
-
except (TypeError, ValueError, AttributeError, KeyError):
|
|
260
|
-
pass
|
|
261
|
-
return cast(IntraWealthDecileImpactWithValues | None, data)
|
|
262
|
-
|
|
263
|
-
intra_wealth_decile = _parse_intra_wealth_decile(d.pop("intra_wealth_decile"))
|
|
264
|
-
|
|
265
|
-
labor_supply_response = LaborSupplyResponse.from_dict(d.pop("labor_supply_response"))
|
|
266
|
-
|
|
267
|
-
def _parse_constituency_impact(data: object) -> None | UKConstituencyBreakdownWithValues:
|
|
268
|
-
if data is None:
|
|
269
|
-
return data
|
|
270
|
-
try:
|
|
271
|
-
if not isinstance(data, dict):
|
|
272
|
-
raise TypeError()
|
|
273
|
-
constituency_impact_type_0 = UKConstituencyBreakdownWithValues.from_dict(data)
|
|
274
|
-
|
|
275
|
-
return constituency_impact_type_0
|
|
276
|
-
except (TypeError, ValueError, AttributeError, KeyError):
|
|
277
|
-
pass
|
|
278
|
-
return cast(None | UKConstituencyBreakdownWithValues, data)
|
|
279
|
-
|
|
280
|
-
constituency_impact = _parse_constituency_impact(d.pop("constituency_impact"))
|
|
281
|
-
|
|
282
|
-
def _parse_local_authority_impact(data: object) -> None | UKLocalAuthorityBreakdownWithValues:
|
|
283
|
-
if data is None:
|
|
284
|
-
return data
|
|
285
|
-
try:
|
|
286
|
-
if not isinstance(data, dict):
|
|
287
|
-
raise TypeError()
|
|
288
|
-
local_authority_impact_type_0 = UKLocalAuthorityBreakdownWithValues.from_dict(data)
|
|
289
|
-
|
|
290
|
-
return local_authority_impact_type_0
|
|
291
|
-
except (TypeError, ValueError, AttributeError, KeyError):
|
|
292
|
-
pass
|
|
293
|
-
return cast(None | UKLocalAuthorityBreakdownWithValues, data)
|
|
294
|
-
|
|
295
|
-
local_authority_impact = _parse_local_authority_impact(d.pop("local_authority_impact"))
|
|
296
|
-
|
|
297
|
-
def _parse_cliff_impact(data: object) -> CliffImpact | None:
|
|
298
|
-
if data is None:
|
|
299
|
-
return data
|
|
300
|
-
try:
|
|
301
|
-
if not isinstance(data, dict):
|
|
302
|
-
raise TypeError()
|
|
303
|
-
cliff_impact_type_0 = CliffImpact.from_dict(data)
|
|
304
|
-
|
|
305
|
-
return cliff_impact_type_0
|
|
306
|
-
except (TypeError, ValueError, AttributeError, KeyError):
|
|
307
|
-
pass
|
|
308
|
-
return cast(CliffImpact | None, data)
|
|
309
|
-
|
|
310
|
-
cliff_impact = _parse_cliff_impact(d.pop("cliff_impact"))
|
|
311
|
-
|
|
312
|
-
def _parse_model_version(data: object) -> None | str | Unset:
|
|
313
|
-
if data is None:
|
|
314
|
-
return data
|
|
315
|
-
if isinstance(data, Unset):
|
|
316
|
-
return data
|
|
317
|
-
return cast(None | str | Unset, data)
|
|
318
|
-
|
|
319
|
-
model_version = _parse_model_version(d.pop("model_version", UNSET))
|
|
320
|
-
|
|
321
|
-
def _parse_data_version(data: object) -> None | str | Unset:
|
|
322
|
-
if data is None:
|
|
323
|
-
return data
|
|
324
|
-
if isinstance(data, Unset):
|
|
325
|
-
return data
|
|
326
|
-
return cast(None | str | Unset, data)
|
|
327
|
-
|
|
328
|
-
data_version = _parse_data_version(d.pop("data_version", UNSET))
|
|
329
|
-
|
|
330
|
-
economy_comparison = cls(
|
|
331
|
-
budget=budget,
|
|
332
|
-
detailed_budget=detailed_budget,
|
|
333
|
-
decile=decile,
|
|
334
|
-
inequality=inequality,
|
|
335
|
-
poverty=poverty,
|
|
336
|
-
poverty_by_gender=poverty_by_gender,
|
|
337
|
-
poverty_by_race=poverty_by_race,
|
|
338
|
-
intra_decile=intra_decile,
|
|
339
|
-
wealth_decile=wealth_decile,
|
|
340
|
-
intra_wealth_decile=intra_wealth_decile,
|
|
341
|
-
labor_supply_response=labor_supply_response,
|
|
342
|
-
constituency_impact=constituency_impact,
|
|
343
|
-
local_authority_impact=local_authority_impact,
|
|
344
|
-
cliff_impact=cliff_impact,
|
|
345
|
-
model_version=model_version,
|
|
346
|
-
data_version=data_version,
|
|
347
|
-
)
|
|
348
|
-
|
|
349
|
-
economy_comparison.additional_properties = d
|
|
350
|
-
return economy_comparison
|
|
351
|
-
|
|
352
|
-
@property
|
|
353
|
-
def additional_keys(self) -> list[str]:
|
|
354
|
-
return list(self.additional_properties.keys())
|
|
355
|
-
|
|
356
|
-
def __getitem__(self, key: str) -> Any:
|
|
357
|
-
return self.additional_properties[key]
|
|
358
|
-
|
|
359
|
-
def __setitem__(self, key: str, value: Any) -> None:
|
|
360
|
-
self.additional_properties[key] = value
|
|
361
|
-
|
|
362
|
-
def __delitem__(self, key: str) -> None:
|
|
363
|
-
del self.additional_properties[key]
|
|
364
|
-
|
|
365
|
-
def __contains__(self, key: str) -> bool:
|
|
366
|
-
return key in self.additional_properties
|
|
@@ -1,59 +0,0 @@
|
|
|
1
|
-
from __future__ import annotations
|
|
2
|
-
|
|
3
|
-
from collections.abc import Mapping
|
|
4
|
-
from typing import TYPE_CHECKING, Any, TypeVar
|
|
5
|
-
|
|
6
|
-
from attrs import define as _attrs_define
|
|
7
|
-
from attrs import field as _attrs_field
|
|
8
|
-
|
|
9
|
-
if TYPE_CHECKING:
|
|
10
|
-
from ..models.program_specific_impact import ProgramSpecificImpact
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
T = TypeVar("T", bound="EconomyComparisonDetailedBudgetType0")
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
@_attrs_define
|
|
17
|
-
class EconomyComparisonDetailedBudgetType0:
|
|
18
|
-
""" """
|
|
19
|
-
|
|
20
|
-
additional_properties: dict[str, ProgramSpecificImpact] = _attrs_field(init=False, factory=dict)
|
|
21
|
-
|
|
22
|
-
def to_dict(self) -> dict[str, Any]:
|
|
23
|
-
field_dict: dict[str, Any] = {}
|
|
24
|
-
for prop_name, prop in self.additional_properties.items():
|
|
25
|
-
field_dict[prop_name] = prop.to_dict()
|
|
26
|
-
|
|
27
|
-
return field_dict
|
|
28
|
-
|
|
29
|
-
@classmethod
|
|
30
|
-
def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
|
|
31
|
-
from ..models.program_specific_impact import ProgramSpecificImpact
|
|
32
|
-
|
|
33
|
-
d = dict(src_dict)
|
|
34
|
-
economy_comparison_detailed_budget_type_0 = cls()
|
|
35
|
-
|
|
36
|
-
additional_properties = {}
|
|
37
|
-
for prop_name, prop_dict in d.items():
|
|
38
|
-
additional_property = ProgramSpecificImpact.from_dict(prop_dict)
|
|
39
|
-
|
|
40
|
-
additional_properties[prop_name] = additional_property
|
|
41
|
-
|
|
42
|
-
economy_comparison_detailed_budget_type_0.additional_properties = additional_properties
|
|
43
|
-
return economy_comparison_detailed_budget_type_0
|
|
44
|
-
|
|
45
|
-
@property
|
|
46
|
-
def additional_keys(self) -> list[str]:
|
|
47
|
-
return list(self.additional_properties.keys())
|
|
48
|
-
|
|
49
|
-
def __getitem__(self, key: str) -> ProgramSpecificImpact:
|
|
50
|
-
return self.additional_properties[key]
|
|
51
|
-
|
|
52
|
-
def __setitem__(self, key: str, value: ProgramSpecificImpact) -> None:
|
|
53
|
-
self.additional_properties[key] = value
|
|
54
|
-
|
|
55
|
-
def __delitem__(self, key: str) -> None:
|
|
56
|
-
del self.additional_properties[key]
|
|
57
|
-
|
|
58
|
-
def __contains__(self, key: str) -> bool:
|
|
59
|
-
return key in self.additional_properties
|
|
@@ -1,75 +0,0 @@
|
|
|
1
|
-
from __future__ import annotations
|
|
2
|
-
|
|
3
|
-
from collections.abc import Mapping
|
|
4
|
-
from typing import TYPE_CHECKING, Any, TypeVar
|
|
5
|
-
|
|
6
|
-
from attrs import define as _attrs_define
|
|
7
|
-
from attrs import field as _attrs_field
|
|
8
|
-
|
|
9
|
-
if TYPE_CHECKING:
|
|
10
|
-
from ..models.baseline_reform_values import BaselineReformValues
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
T = TypeVar("T", bound="GenderBaselineReformValues")
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
@_attrs_define
|
|
17
|
-
class GenderBaselineReformValues:
|
|
18
|
-
"""
|
|
19
|
-
Attributes:
|
|
20
|
-
male (BaselineReformValues):
|
|
21
|
-
female (BaselineReformValues):
|
|
22
|
-
"""
|
|
23
|
-
|
|
24
|
-
male: BaselineReformValues
|
|
25
|
-
female: BaselineReformValues
|
|
26
|
-
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
|
|
27
|
-
|
|
28
|
-
def to_dict(self) -> dict[str, Any]:
|
|
29
|
-
male = self.male.to_dict()
|
|
30
|
-
|
|
31
|
-
female = self.female.to_dict()
|
|
32
|
-
|
|
33
|
-
field_dict: dict[str, Any] = {}
|
|
34
|
-
field_dict.update(self.additional_properties)
|
|
35
|
-
field_dict.update(
|
|
36
|
-
{
|
|
37
|
-
"male": male,
|
|
38
|
-
"female": female,
|
|
39
|
-
}
|
|
40
|
-
)
|
|
41
|
-
|
|
42
|
-
return field_dict
|
|
43
|
-
|
|
44
|
-
@classmethod
|
|
45
|
-
def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
|
|
46
|
-
from ..models.baseline_reform_values import BaselineReformValues
|
|
47
|
-
|
|
48
|
-
d = dict(src_dict)
|
|
49
|
-
male = BaselineReformValues.from_dict(d.pop("male"))
|
|
50
|
-
|
|
51
|
-
female = BaselineReformValues.from_dict(d.pop("female"))
|
|
52
|
-
|
|
53
|
-
gender_baseline_reform_values = cls(
|
|
54
|
-
male=male,
|
|
55
|
-
female=female,
|
|
56
|
-
)
|
|
57
|
-
|
|
58
|
-
gender_baseline_reform_values.additional_properties = d
|
|
59
|
-
return gender_baseline_reform_values
|
|
60
|
-
|
|
61
|
-
@property
|
|
62
|
-
def additional_keys(self) -> list[str]:
|
|
63
|
-
return list(self.additional_properties.keys())
|
|
64
|
-
|
|
65
|
-
def __getitem__(self, key: str) -> Any:
|
|
66
|
-
return self.additional_properties[key]
|
|
67
|
-
|
|
68
|
-
def __setitem__(self, key: str, value: Any) -> None:
|
|
69
|
-
self.additional_properties[key] = value
|
|
70
|
-
|
|
71
|
-
def __delitem__(self, key: str) -> None:
|
|
72
|
-
del self.additional_properties[key]
|
|
73
|
-
|
|
74
|
-
def __contains__(self, key: str) -> bool:
|
|
75
|
-
return key in self.additional_properties
|