docket-client 0.3.2__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.
- docket/__init__.py +8 -0
- docket/api/__init__.py +1 -0
- docket/api/access/__init__.py +1 -0
- docket/api/access/add_principal.py +193 -0
- docket/api/access/archive_role_assignment.py +182 -0
- docket/api/access/create_api_token.py +198 -0
- docket/api/access/create_application_principal.py +188 -0
- docket/api/access/create_role_assignment.py +194 -0
- docket/api/access/list_api_tokens.py +184 -0
- docket/api/access/list_principals.py +184 -0
- docket/api/access/list_role_assignments.py +200 -0
- docket/api/access/revoke_api_token.py +173 -0
- docket/api/identity/__init__.py +1 -0
- docket/api/identity/create_my_api_token.py +206 -0
- docket/api/identity/get_me.py +127 -0
- docket/api/identity/list_my_api_tokens.py +151 -0
- docket/api/identity/revoke_my_api_token.py +178 -0
- docket/api/recurring_acquisitions/__init__.py +1 -0
- docket/api/recurring_acquisitions/archive_recurring_acquisition.py +207 -0
- docket/api/recurring_acquisitions/create_recurring_acquisition.py +218 -0
- docket/api/recurring_acquisitions/get_recurring_acquisition.py +163 -0
- docket/api/recurring_acquisitions/list_recurring_acquisitions.py +248 -0
- docket/api/recurring_acquisitions/preview_recurring_acquisition.py +187 -0
- docket/api/recurring_acquisitions/preview_split_recurring_acquisition.py +232 -0
- docket/api/recurring_acquisitions/split_recurring_acquisition.py +258 -0
- docket/api/runs/__init__.py +1 -0
- docket/api/runs/get_run.py +160 -0
- docket/api/runs/list_runs.py +180 -0
- docket/api/runs/report_run_outcome.py +206 -0
- docket/api/scheduled_acquisitions/__init__.py +1 -0
- docket/api/scheduled_acquisitions/archive_scheduled_acquisition.py +203 -0
- docket/api/scheduled_acquisitions/create_scheduled_acquisition.py +185 -0
- docket/api/scheduled_acquisitions/get_resolved_settings.py +169 -0
- docket/api/scheduled_acquisitions/get_scheduled_acquisition.py +159 -0
- docket/api/scheduled_acquisitions/list_active_acquisitions.py +297 -0
- docket/api/scheduled_acquisitions/list_runs_for_scheduled_acquisition.py +191 -0
- docket/api/scheduled_acquisitions/list_scheduled_acquisitions.py +332 -0
- docket/api/scheduled_acquisitions/preview_scheduled_acquisition_edit.py +224 -0
- docket/api/scheduled_acquisitions/set_planning_status.py +199 -0
- docket/api/scheduled_acquisitions/start_run.py +221 -0
- docket/api/scheduled_acquisitions/update_scheduled_acquisition.py +226 -0
- docket/api/settings/__init__.py +1 -0
- docket/api/settings/list_behavior_curriculum_discriminator_values.py +188 -0
- docket/api/settings/list_behavior_curriculum_settings.py +199 -0
- docket/api/settings/list_fip_discriminator_values.py +184 -0
- docket/api/settings/list_fip_settings.py +195 -0
- docket/api/settings/list_live_behavior_curriculum_settings.py +233 -0
- docket/api/settings/list_live_fip_settings.py +225 -0
- docket/api/settings/preview_behavior_curriculum_settings.py +191 -0
- docket/api/settings/preview_fip_settings.py +177 -0
- docket/api/settings/push_behavior_curriculum_settings.py +222 -0
- docket/api/settings/push_fip_settings.py +206 -0
- docket/api/templates/__init__.py +1 -0
- docket/api/templates/archive_template.py +203 -0
- docket/api/templates/create_template.py +206 -0
- docket/api/templates/get_template.py +159 -0
- docket/api/templates/list_templates.py +174 -0
- docket/api/templates/update_template.py +234 -0
- docket/api/vocabulary/__init__.py +1 -0
- docket/api/vocabulary/list_instruments.py +165 -0
- docket/api/vocabulary/list_persons.py +132 -0
- docket/api/vocabulary/list_projects.py +132 -0
- docket/api/vocabulary/list_subjects.py +132 -0
- docket/api/vocabulary/lookup_person.py +166 -0
- docket/api/vocabulary/lookup_subject.py +166 -0
- docket/api/vocabulary/sync_vocabulary.py +148 -0
- docket/client.py +272 -0
- docket/errors.py +16 -0
- docket/models/__init__.py +221 -0
- docket/models/access_role.py +12 -0
- docket/models/access_role_nullable_type_1.py +12 -0
- docket/models/access_role_nullable_type_2_type_1.py +12 -0
- docket/models/access_role_nullable_type_3_type_1.py +12 -0
- docket/models/acquisition_variable.py +72 -0
- docket/models/acquisition_warning.py +126 -0
- docket/models/add_principal_request.py +83 -0
- docket/models/api_token_response.py +271 -0
- docket/models/api_token_status.py +10 -0
- docket/models/archive_recurring_acquisition_request.py +77 -0
- docket/models/archive_recurring_acquisition_response.py +83 -0
- docket/models/archive_scheduled_acquisition_request.py +78 -0
- docket/models/archive_template_request.py +66 -0
- docket/models/auth_mode.py +10 -0
- docket/models/behavior_curriculum_push_settings_request.py +85 -0
- docket/models/behavior_curriculum_settings.py +55 -0
- docket/models/behavior_curriculum_settings_preview_response.py +102 -0
- docket/models/behavior_curriculum_settings_preview_response_promoted.py +50 -0
- docket/models/behavior_curriculum_settings_version_response.py +160 -0
- docket/models/behavior_curriculum_settings_version_response_promoted.py +50 -0
- docket/models/caller_kind.py +11 -0
- docket/models/create_api_token_request.py +97 -0
- docket/models/create_application_principal_request.py +65 -0
- docket/models/create_personal_api_token_request.py +167 -0
- docket/models/create_recurring_acquisition_request.py +269 -0
- docket/models/create_role_assignment_request.py +99 -0
- docket/models/create_scheduled_acquisition_request.py +265 -0
- docket/models/create_template_request.py +323 -0
- docket/models/created_api_token_response.py +82 -0
- docket/models/effective_status.py +15 -0
- docket/models/fip_color.py +13 -0
- docket/models/fip_fiber.py +93 -0
- docket/models/fip_mode.py +9 -0
- docket/models/fip_push_settings_request.py +82 -0
- docket/models/fip_settings.py +91 -0
- docket/models/fip_settings_preview_response.py +97 -0
- docket/models/fip_settings_preview_response_promoted.py +50 -0
- docket/models/fip_settings_version_response.py +155 -0
- docket/models/fip_settings_version_response_promoted.py +50 -0
- docket/models/future_occurrences.py +9 -0
- docket/models/get_resolved_settings_response_200.py +65 -0
- docket/models/held_role_response.py +116 -0
- docket/models/http_validation_problem_details.py +204 -0
- docket/models/http_validation_problem_details_errors.py +59 -0
- docket/models/instrument_response.py +91 -0
- docket/models/kept_occurrence.py +85 -0
- docket/models/kept_occurrence_reason.py +10 -0
- docket/models/list_active_acquisitions_effective_status_item.py +15 -0
- docket/models/list_scheduled_acquisitions_planning_status.py +11 -0
- docket/models/me_caller.py +118 -0
- docket/models/me_permission.py +98 -0
- docket/models/me_response.py +158 -0
- docket/models/me_role.py +75 -0
- docket/models/occurrence_preview.py +121 -0
- docket/models/occurrence_summary.py +126 -0
- docket/models/occurrence_warnings.py +91 -0
- docket/models/permission_action.py +12 -0
- docket/models/person_assignment.py +74 -0
- docket/models/person_lookup_response.py +131 -0
- docket/models/person_response.py +103 -0
- docket/models/person_role.py +9 -0
- docket/models/personal_token_limits.py +92 -0
- docket/models/planning_status.py +11 -0
- docket/models/principal_kind.py +9 -0
- docket/models/principal_response.py +216 -0
- docket/models/problem_details.py +177 -0
- docket/models/project_response.py +75 -0
- docket/models/recurrence_exception_kind.py +13 -0
- docket/models/recurrence_exception_response.py +103 -0
- docket/models/recurrence_frequency.py +9 -0
- docket/models/recurrence_preview_response.py +101 -0
- docket/models/recurrence_rule.py +207 -0
- docket/models/recurring_acquisition_created_response.py +123 -0
- docket/models/recurring_acquisition_detail_response.py +105 -0
- docket/models/recurring_acquisition_response.py +326 -0
- docket/models/report_run_outcome_request.py +89 -0
- docket/models/resolution_mode.py +10 -0
- docket/models/resolved_settings.py +73 -0
- docket/models/role_assignment_response.py +157 -0
- docket/models/role_origin.py +10 -0
- docket/models/role_source_kind.py +10 -0
- docket/models/run_origin.py +9 -0
- docket/models/run_outcome.py +9 -0
- docket/models/run_response.py +181 -0
- docket/models/run_settings_snapshot.py +72 -0
- docket/models/run_start_response.py +91 -0
- docket/models/run_start_response_settings.py +65 -0
- docket/models/run_status.py +11 -0
- docket/models/scheduled_acquisition_edit_preview_response.py +150 -0
- docket/models/scheduled_acquisition_response.py +366 -0
- docket/models/set_planning_status_request.py +90 -0
- docket/models/settings_selector.py +138 -0
- docket/models/skipped_occurrence.py +85 -0
- docket/models/split_preview_response.py +129 -0
- docket/models/split_recurring_acquisition_request.py +261 -0
- docket/models/split_recurring_acquisition_response.py +159 -0
- docket/models/start_run_request.py +73 -0
- docket/models/subject_lookup_response.py +149 -0
- docket/models/subject_response.py +128 -0
- docket/models/sync_counts.py +80 -0
- docket/models/sync_response.py +81 -0
- docket/models/template_response.py +302 -0
- docket/models/update_scheduled_acquisition_request.py +235 -0
- docket/models/update_template_request.py +279 -0
- docket/models/weekday.py +14 -0
- docket/types.py +54 -0
- docket_auth/__init__.py +239 -0
- docket_client-0.3.2.dist-info/METADATA +233 -0
- docket_client-0.3.2.dist-info/RECORD +188 -0
- docket_client-0.3.2.dist-info/WHEEL +4 -0
- docket_client-0.3.2.dist-info/entry_points.txt +2 -0
- docket_mcp/__init__.py +6 -0
- docket_mcp/api.py +207 -0
- docket_mcp/config.py +57 -0
- docket_mcp/server.py +78 -0
- docket_mcp/signin.py +155 -0
- docket_mcp/slots.py +80 -0
- docket_mcp/times.py +160 -0
- docket_mcp/tools.py +1202 -0
|
@@ -0,0 +1,207 @@
|
|
|
1
|
+
from __future__ import annotations
|
|
2
|
+
|
|
3
|
+
from collections.abc import Mapping
|
|
4
|
+
from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator
|
|
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
|
+
from ..models.recurrence_frequency import RecurrenceFrequency
|
|
12
|
+
from ..models.weekday import Weekday
|
|
13
|
+
from ..types import UNSET, Unset
|
|
14
|
+
from typing import cast
|
|
15
|
+
import datetime
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
T = TypeVar("T", bound="RecurrenceRule")
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
@_attrs_define
|
|
22
|
+
class RecurrenceRule:
|
|
23
|
+
"""When a series occurs. Occurrences are computed from the local date and
|
|
24
|
+
`local_start_time` in `time_zone`, so 09:00
|
|
25
|
+
stays 09:00 across daylight-saving changes. Exactly one of
|
|
26
|
+
`count` and `until` is required (finite series only).
|
|
27
|
+
|
|
28
|
+
Attributes:
|
|
29
|
+
frequency (RecurrenceFrequency):
|
|
30
|
+
local_start_time (str): Wall-clock time of day, e.g. 09:00:00.
|
|
31
|
+
duration_minutes (int): Planned length of each occurrence in elapsed minutes, at least 1.
|
|
32
|
+
time_zone (str): IANA zone id such as `America/Los_Angeles`. Required; never inferred from an offset.
|
|
33
|
+
start_date (datetime.date): Calendar date, e.g. 2026-10-15.
|
|
34
|
+
interval (int | Unset): Every n days or weeks; at least 1. Default: 1.
|
|
35
|
+
weekdays (list[Weekday] | None | Unset): Weekly only, at least one: the days of the week (in the recurrence
|
|
36
|
+
zone). Omit for daily.
|
|
37
|
+
count (int | None | Unset): Number of occurrences, 1-366; skipped daylight-saving occurrences count toward it.
|
|
38
|
+
The last one must fall within six months of `start_date`.
|
|
39
|
+
until (datetime.date | None | Unset): Last local date, inclusive; at most six calendar months after `start_date`
|
|
40
|
+
(a series is never open-ended).
|
|
41
|
+
"""
|
|
42
|
+
|
|
43
|
+
frequency: RecurrenceFrequency
|
|
44
|
+
local_start_time: str
|
|
45
|
+
duration_minutes: int
|
|
46
|
+
time_zone: str
|
|
47
|
+
start_date: datetime.date
|
|
48
|
+
interval: int | Unset = 1
|
|
49
|
+
weekdays: list[Weekday] | None | Unset = UNSET
|
|
50
|
+
count: int | None | Unset = UNSET
|
|
51
|
+
until: datetime.date | None | Unset = UNSET
|
|
52
|
+
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
|
|
53
|
+
|
|
54
|
+
def to_dict(self) -> dict[str, Any]:
|
|
55
|
+
frequency = self.frequency.value
|
|
56
|
+
|
|
57
|
+
local_start_time = self.local_start_time
|
|
58
|
+
|
|
59
|
+
duration_minutes = self.duration_minutes
|
|
60
|
+
|
|
61
|
+
time_zone = self.time_zone
|
|
62
|
+
|
|
63
|
+
start_date = self.start_date.isoformat()
|
|
64
|
+
|
|
65
|
+
interval = self.interval
|
|
66
|
+
|
|
67
|
+
weekdays: list[str] | None | Unset
|
|
68
|
+
if isinstance(self.weekdays, Unset):
|
|
69
|
+
weekdays = UNSET
|
|
70
|
+
elif isinstance(self.weekdays, list):
|
|
71
|
+
weekdays = []
|
|
72
|
+
for weekdays_type_1_item_data in self.weekdays:
|
|
73
|
+
weekdays_type_1_item = weekdays_type_1_item_data.value
|
|
74
|
+
weekdays.append(weekdays_type_1_item)
|
|
75
|
+
|
|
76
|
+
else:
|
|
77
|
+
weekdays = self.weekdays
|
|
78
|
+
|
|
79
|
+
count: int | None | Unset
|
|
80
|
+
if isinstance(self.count, Unset):
|
|
81
|
+
count = UNSET
|
|
82
|
+
else:
|
|
83
|
+
count = self.count
|
|
84
|
+
|
|
85
|
+
until: None | str | Unset
|
|
86
|
+
if isinstance(self.until, Unset):
|
|
87
|
+
until = UNSET
|
|
88
|
+
elif isinstance(self.until, datetime.date):
|
|
89
|
+
until = self.until.isoformat()
|
|
90
|
+
else:
|
|
91
|
+
until = self.until
|
|
92
|
+
|
|
93
|
+
field_dict: dict[str, Any] = {}
|
|
94
|
+
field_dict.update(self.additional_properties)
|
|
95
|
+
field_dict.update(
|
|
96
|
+
{
|
|
97
|
+
"frequency": frequency,
|
|
98
|
+
"local_start_time": local_start_time,
|
|
99
|
+
"duration_minutes": duration_minutes,
|
|
100
|
+
"time_zone": time_zone,
|
|
101
|
+
"start_date": start_date,
|
|
102
|
+
}
|
|
103
|
+
)
|
|
104
|
+
if interval is not UNSET:
|
|
105
|
+
field_dict["interval"] = interval
|
|
106
|
+
if weekdays is not UNSET:
|
|
107
|
+
field_dict["weekdays"] = weekdays
|
|
108
|
+
if count is not UNSET:
|
|
109
|
+
field_dict["count"] = count
|
|
110
|
+
if until is not UNSET:
|
|
111
|
+
field_dict["until"] = until
|
|
112
|
+
|
|
113
|
+
return field_dict
|
|
114
|
+
|
|
115
|
+
@classmethod
|
|
116
|
+
def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
|
|
117
|
+
d = dict(src_dict)
|
|
118
|
+
frequency = RecurrenceFrequency(d.pop("frequency"))
|
|
119
|
+
|
|
120
|
+
local_start_time = d.pop("local_start_time")
|
|
121
|
+
|
|
122
|
+
duration_minutes = d.pop("duration_minutes")
|
|
123
|
+
|
|
124
|
+
time_zone = d.pop("time_zone")
|
|
125
|
+
|
|
126
|
+
start_date = datetime.date.fromisoformat(d.pop("start_date"))
|
|
127
|
+
|
|
128
|
+
interval = d.pop("interval", UNSET)
|
|
129
|
+
|
|
130
|
+
def _parse_weekdays(data: object) -> list[Weekday] | None | Unset:
|
|
131
|
+
if data is None:
|
|
132
|
+
return data
|
|
133
|
+
if isinstance(data, Unset):
|
|
134
|
+
return data
|
|
135
|
+
try:
|
|
136
|
+
if not isinstance(data, list):
|
|
137
|
+
raise TypeError()
|
|
138
|
+
weekdays_type_1 = []
|
|
139
|
+
_weekdays_type_1 = data
|
|
140
|
+
for weekdays_type_1_item_data in _weekdays_type_1:
|
|
141
|
+
weekdays_type_1_item = Weekday(weekdays_type_1_item_data)
|
|
142
|
+
|
|
143
|
+
weekdays_type_1.append(weekdays_type_1_item)
|
|
144
|
+
|
|
145
|
+
return weekdays_type_1
|
|
146
|
+
except (TypeError, ValueError, AttributeError, KeyError):
|
|
147
|
+
pass
|
|
148
|
+
return cast(list[Weekday] | None | Unset, data)
|
|
149
|
+
|
|
150
|
+
weekdays = _parse_weekdays(d.pop("weekdays", UNSET))
|
|
151
|
+
|
|
152
|
+
def _parse_count(data: object) -> int | None | Unset:
|
|
153
|
+
if data is None:
|
|
154
|
+
return data
|
|
155
|
+
if isinstance(data, Unset):
|
|
156
|
+
return data
|
|
157
|
+
return cast(int | None | Unset, data)
|
|
158
|
+
|
|
159
|
+
count = _parse_count(d.pop("count", UNSET))
|
|
160
|
+
|
|
161
|
+
def _parse_until(data: object) -> datetime.date | None | Unset:
|
|
162
|
+
if data is None:
|
|
163
|
+
return data
|
|
164
|
+
if isinstance(data, Unset):
|
|
165
|
+
return data
|
|
166
|
+
try:
|
|
167
|
+
if not isinstance(data, str):
|
|
168
|
+
raise TypeError()
|
|
169
|
+
until_type_1 = datetime.date.fromisoformat(data)
|
|
170
|
+
|
|
171
|
+
return until_type_1
|
|
172
|
+
except (TypeError, ValueError, AttributeError, KeyError):
|
|
173
|
+
pass
|
|
174
|
+
return cast(datetime.date | None | Unset, data)
|
|
175
|
+
|
|
176
|
+
until = _parse_until(d.pop("until", UNSET))
|
|
177
|
+
|
|
178
|
+
recurrence_rule = cls(
|
|
179
|
+
frequency=frequency,
|
|
180
|
+
local_start_time=local_start_time,
|
|
181
|
+
duration_minutes=duration_minutes,
|
|
182
|
+
time_zone=time_zone,
|
|
183
|
+
start_date=start_date,
|
|
184
|
+
interval=interval,
|
|
185
|
+
weekdays=weekdays,
|
|
186
|
+
count=count,
|
|
187
|
+
until=until,
|
|
188
|
+
)
|
|
189
|
+
|
|
190
|
+
recurrence_rule.additional_properties = d
|
|
191
|
+
return recurrence_rule
|
|
192
|
+
|
|
193
|
+
@property
|
|
194
|
+
def additional_keys(self) -> list[str]:
|
|
195
|
+
return list(self.additional_properties.keys())
|
|
196
|
+
|
|
197
|
+
def __getitem__(self, key: str) -> Any:
|
|
198
|
+
return self.additional_properties[key]
|
|
199
|
+
|
|
200
|
+
def __setitem__(self, key: str, value: Any) -> None:
|
|
201
|
+
self.additional_properties[key] = value
|
|
202
|
+
|
|
203
|
+
def __delitem__(self, key: str) -> None:
|
|
204
|
+
del self.additional_properties[key]
|
|
205
|
+
|
|
206
|
+
def __contains__(self, key: str) -> bool:
|
|
207
|
+
return key in self.additional_properties
|
|
@@ -0,0 +1,123 @@
|
|
|
1
|
+
from __future__ import annotations
|
|
2
|
+
|
|
3
|
+
from collections.abc import Mapping
|
|
4
|
+
from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator
|
|
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
|
+
from typing import cast
|
|
12
|
+
|
|
13
|
+
if TYPE_CHECKING:
|
|
14
|
+
from ..models.occurrence_warnings import OccurrenceWarnings
|
|
15
|
+
from ..models.recurring_acquisition_response import RecurringAcquisitionResponse
|
|
16
|
+
from ..models.skipped_occurrence import SkippedOccurrence
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
T = TypeVar("T", bound="RecurringAcquisitionCreatedResponse")
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
@_attrs_define
|
|
23
|
+
class RecurringAcquisitionCreatedResponse:
|
|
24
|
+
"""A created series.
|
|
25
|
+
|
|
26
|
+
Attributes:
|
|
27
|
+
definition (RecurringAcquisitionResponse): A recurring definition: scheduling intent, from which occurrences
|
|
28
|
+
were materialized.
|
|
29
|
+
occurrence_ids (list[int]): Ids of the created scheduled acquisitions, in occurrence order.
|
|
30
|
+
skipped (list[SkippedOccurrence]): Occurrences skipped because their local time does not exist or is ambiguous;
|
|
31
|
+
add them by hand if wanted.
|
|
32
|
+
warnings (list[OccurrenceWarnings]): Overlap warnings per occurrence; only occurrences that have any are listed.
|
|
33
|
+
Warnings never reject the write.
|
|
34
|
+
"""
|
|
35
|
+
|
|
36
|
+
definition: RecurringAcquisitionResponse
|
|
37
|
+
occurrence_ids: list[int]
|
|
38
|
+
skipped: list[SkippedOccurrence]
|
|
39
|
+
warnings: list[OccurrenceWarnings]
|
|
40
|
+
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
|
|
41
|
+
|
|
42
|
+
def to_dict(self) -> dict[str, Any]:
|
|
43
|
+
from ..models.occurrence_warnings import OccurrenceWarnings
|
|
44
|
+
from ..models.recurring_acquisition_response import RecurringAcquisitionResponse
|
|
45
|
+
from ..models.skipped_occurrence import SkippedOccurrence
|
|
46
|
+
|
|
47
|
+
definition = self.definition.to_dict()
|
|
48
|
+
|
|
49
|
+
occurrence_ids = self.occurrence_ids
|
|
50
|
+
|
|
51
|
+
skipped = []
|
|
52
|
+
for skipped_item_data in self.skipped:
|
|
53
|
+
skipped_item = skipped_item_data.to_dict()
|
|
54
|
+
skipped.append(skipped_item)
|
|
55
|
+
|
|
56
|
+
warnings = []
|
|
57
|
+
for warnings_item_data in self.warnings:
|
|
58
|
+
warnings_item = warnings_item_data.to_dict()
|
|
59
|
+
warnings.append(warnings_item)
|
|
60
|
+
|
|
61
|
+
field_dict: dict[str, Any] = {}
|
|
62
|
+
field_dict.update(self.additional_properties)
|
|
63
|
+
field_dict.update(
|
|
64
|
+
{
|
|
65
|
+
"definition": definition,
|
|
66
|
+
"occurrence_ids": occurrence_ids,
|
|
67
|
+
"skipped": skipped,
|
|
68
|
+
"warnings": warnings,
|
|
69
|
+
}
|
|
70
|
+
)
|
|
71
|
+
|
|
72
|
+
return field_dict
|
|
73
|
+
|
|
74
|
+
@classmethod
|
|
75
|
+
def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
|
|
76
|
+
from ..models.occurrence_warnings import OccurrenceWarnings
|
|
77
|
+
from ..models.recurring_acquisition_response import RecurringAcquisitionResponse
|
|
78
|
+
from ..models.skipped_occurrence import SkippedOccurrence
|
|
79
|
+
|
|
80
|
+
d = dict(src_dict)
|
|
81
|
+
definition = RecurringAcquisitionResponse.from_dict(d.pop("definition"))
|
|
82
|
+
|
|
83
|
+
occurrence_ids = cast(list[int], d.pop("occurrence_ids"))
|
|
84
|
+
|
|
85
|
+
skipped = []
|
|
86
|
+
_skipped = d.pop("skipped")
|
|
87
|
+
for skipped_item_data in _skipped:
|
|
88
|
+
skipped_item = SkippedOccurrence.from_dict(skipped_item_data)
|
|
89
|
+
|
|
90
|
+
skipped.append(skipped_item)
|
|
91
|
+
|
|
92
|
+
warnings = []
|
|
93
|
+
_warnings = d.pop("warnings")
|
|
94
|
+
for warnings_item_data in _warnings:
|
|
95
|
+
warnings_item = OccurrenceWarnings.from_dict(warnings_item_data)
|
|
96
|
+
|
|
97
|
+
warnings.append(warnings_item)
|
|
98
|
+
|
|
99
|
+
recurring_acquisition_created_response = cls(
|
|
100
|
+
definition=definition,
|
|
101
|
+
occurrence_ids=occurrence_ids,
|
|
102
|
+
skipped=skipped,
|
|
103
|
+
warnings=warnings,
|
|
104
|
+
)
|
|
105
|
+
|
|
106
|
+
recurring_acquisition_created_response.additional_properties = d
|
|
107
|
+
return recurring_acquisition_created_response
|
|
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,105 @@
|
|
|
1
|
+
from __future__ import annotations
|
|
2
|
+
|
|
3
|
+
from collections.abc import Mapping
|
|
4
|
+
from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator
|
|
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
|
+
from typing import cast
|
|
12
|
+
|
|
13
|
+
if TYPE_CHECKING:
|
|
14
|
+
from ..models.occurrence_summary import OccurrenceSummary
|
|
15
|
+
from ..models.recurrence_exception_response import RecurrenceExceptionResponse
|
|
16
|
+
from ..models.recurring_acquisition_response import RecurringAcquisitionResponse
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
T = TypeVar("T", bound="RecurringAcquisitionDetailResponse")
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
@_attrs_define
|
|
23
|
+
class RecurringAcquisitionDetailResponse:
|
|
24
|
+
"""A definition with a summary of what it produced.
|
|
25
|
+
|
|
26
|
+
Attributes:
|
|
27
|
+
definition (RecurringAcquisitionResponse): A recurring definition: scheduling intent, from which occurrences
|
|
28
|
+
were materialized.
|
|
29
|
+
occurrences (OccurrenceSummary): Summary of a series' occurrences (archived ones included).
|
|
30
|
+
exceptions (list[RecurrenceExceptionResponse]):
|
|
31
|
+
"""
|
|
32
|
+
|
|
33
|
+
definition: RecurringAcquisitionResponse
|
|
34
|
+
occurrences: OccurrenceSummary
|
|
35
|
+
exceptions: list[RecurrenceExceptionResponse]
|
|
36
|
+
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
|
|
37
|
+
|
|
38
|
+
def to_dict(self) -> dict[str, Any]:
|
|
39
|
+
from ..models.occurrence_summary import OccurrenceSummary
|
|
40
|
+
from ..models.recurrence_exception_response import RecurrenceExceptionResponse
|
|
41
|
+
from ..models.recurring_acquisition_response import RecurringAcquisitionResponse
|
|
42
|
+
|
|
43
|
+
definition = self.definition.to_dict()
|
|
44
|
+
|
|
45
|
+
occurrences = self.occurrences.to_dict()
|
|
46
|
+
|
|
47
|
+
exceptions = []
|
|
48
|
+
for exceptions_item_data in self.exceptions:
|
|
49
|
+
exceptions_item = exceptions_item_data.to_dict()
|
|
50
|
+
exceptions.append(exceptions_item)
|
|
51
|
+
|
|
52
|
+
field_dict: dict[str, Any] = {}
|
|
53
|
+
field_dict.update(self.additional_properties)
|
|
54
|
+
field_dict.update(
|
|
55
|
+
{
|
|
56
|
+
"definition": definition,
|
|
57
|
+
"occurrences": occurrences,
|
|
58
|
+
"exceptions": exceptions,
|
|
59
|
+
}
|
|
60
|
+
)
|
|
61
|
+
|
|
62
|
+
return field_dict
|
|
63
|
+
|
|
64
|
+
@classmethod
|
|
65
|
+
def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
|
|
66
|
+
from ..models.occurrence_summary import OccurrenceSummary
|
|
67
|
+
from ..models.recurrence_exception_response import RecurrenceExceptionResponse
|
|
68
|
+
from ..models.recurring_acquisition_response import RecurringAcquisitionResponse
|
|
69
|
+
|
|
70
|
+
d = dict(src_dict)
|
|
71
|
+
definition = RecurringAcquisitionResponse.from_dict(d.pop("definition"))
|
|
72
|
+
|
|
73
|
+
occurrences = OccurrenceSummary.from_dict(d.pop("occurrences"))
|
|
74
|
+
|
|
75
|
+
exceptions = []
|
|
76
|
+
_exceptions = d.pop("exceptions")
|
|
77
|
+
for exceptions_item_data in _exceptions:
|
|
78
|
+
exceptions_item = RecurrenceExceptionResponse.from_dict(exceptions_item_data)
|
|
79
|
+
|
|
80
|
+
exceptions.append(exceptions_item)
|
|
81
|
+
|
|
82
|
+
recurring_acquisition_detail_response = cls(
|
|
83
|
+
definition=definition,
|
|
84
|
+
occurrences=occurrences,
|
|
85
|
+
exceptions=exceptions,
|
|
86
|
+
)
|
|
87
|
+
|
|
88
|
+
recurring_acquisition_detail_response.additional_properties = d
|
|
89
|
+
return recurring_acquisition_detail_response
|
|
90
|
+
|
|
91
|
+
@property
|
|
92
|
+
def additional_keys(self) -> list[str]:
|
|
93
|
+
return list(self.additional_properties.keys())
|
|
94
|
+
|
|
95
|
+
def __getitem__(self, key: str) -> Any:
|
|
96
|
+
return self.additional_properties[key]
|
|
97
|
+
|
|
98
|
+
def __setitem__(self, key: str, value: Any) -> None:
|
|
99
|
+
self.additional_properties[key] = value
|
|
100
|
+
|
|
101
|
+
def __delitem__(self, key: str) -> None:
|
|
102
|
+
del self.additional_properties[key]
|
|
103
|
+
|
|
104
|
+
def __contains__(self, key: str) -> bool:
|
|
105
|
+
return key in self.additional_properties
|