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,149 @@
|
|
|
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
|
+
import datetime
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
T = TypeVar("T", bound="SubjectLookupResponse")
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
@_attrs_define
|
|
19
|
+
class SubjectLookupResponse:
|
|
20
|
+
"""Answer to "is this a real subject?". Returned with 200 even when bool SubjectLookupResponse.Valid is false.
|
|
21
|
+
|
|
22
|
+
Attributes:
|
|
23
|
+
valid (bool): Whether the metadata service knows the subject.
|
|
24
|
+
subject_id (None | str): Canonical id when valid.
|
|
25
|
+
detail (None | str): Why the subject is not valid; null when valid.
|
|
26
|
+
sex (None | str): Subject sex as recorded by the metadata service, if any.
|
|
27
|
+
date_of_birth (datetime.date | None):
|
|
28
|
+
genotype (None | str): Genotype, if any.
|
|
29
|
+
"""
|
|
30
|
+
|
|
31
|
+
valid: bool
|
|
32
|
+
subject_id: None | str
|
|
33
|
+
detail: None | str
|
|
34
|
+
sex: None | str
|
|
35
|
+
date_of_birth: datetime.date | None
|
|
36
|
+
genotype: None | str
|
|
37
|
+
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
|
|
38
|
+
|
|
39
|
+
def to_dict(self) -> dict[str, Any]:
|
|
40
|
+
valid = self.valid
|
|
41
|
+
|
|
42
|
+
subject_id: None | str
|
|
43
|
+
subject_id = self.subject_id
|
|
44
|
+
|
|
45
|
+
detail: None | str
|
|
46
|
+
detail = self.detail
|
|
47
|
+
|
|
48
|
+
sex: None | str
|
|
49
|
+
sex = self.sex
|
|
50
|
+
|
|
51
|
+
date_of_birth: None | str
|
|
52
|
+
if isinstance(self.date_of_birth, datetime.date):
|
|
53
|
+
date_of_birth = self.date_of_birth.isoformat()
|
|
54
|
+
else:
|
|
55
|
+
date_of_birth = self.date_of_birth
|
|
56
|
+
|
|
57
|
+
genotype: None | str
|
|
58
|
+
genotype = self.genotype
|
|
59
|
+
|
|
60
|
+
field_dict: dict[str, Any] = {}
|
|
61
|
+
field_dict.update(self.additional_properties)
|
|
62
|
+
field_dict.update(
|
|
63
|
+
{
|
|
64
|
+
"valid": valid,
|
|
65
|
+
"subject_id": subject_id,
|
|
66
|
+
"detail": detail,
|
|
67
|
+
"sex": sex,
|
|
68
|
+
"date_of_birth": date_of_birth,
|
|
69
|
+
"genotype": genotype,
|
|
70
|
+
}
|
|
71
|
+
)
|
|
72
|
+
|
|
73
|
+
return field_dict
|
|
74
|
+
|
|
75
|
+
@classmethod
|
|
76
|
+
def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
|
|
77
|
+
d = dict(src_dict)
|
|
78
|
+
valid = d.pop("valid")
|
|
79
|
+
|
|
80
|
+
def _parse_subject_id(data: object) -> None | str:
|
|
81
|
+
if data is None:
|
|
82
|
+
return data
|
|
83
|
+
return cast(None | str, data)
|
|
84
|
+
|
|
85
|
+
subject_id = _parse_subject_id(d.pop("subject_id"))
|
|
86
|
+
|
|
87
|
+
def _parse_detail(data: object) -> None | str:
|
|
88
|
+
if data is None:
|
|
89
|
+
return data
|
|
90
|
+
return cast(None | str, data)
|
|
91
|
+
|
|
92
|
+
detail = _parse_detail(d.pop("detail"))
|
|
93
|
+
|
|
94
|
+
def _parse_sex(data: object) -> None | str:
|
|
95
|
+
if data is None:
|
|
96
|
+
return data
|
|
97
|
+
return cast(None | str, data)
|
|
98
|
+
|
|
99
|
+
sex = _parse_sex(d.pop("sex"))
|
|
100
|
+
|
|
101
|
+
def _parse_date_of_birth(data: object) -> datetime.date | None:
|
|
102
|
+
if data is None:
|
|
103
|
+
return data
|
|
104
|
+
try:
|
|
105
|
+
if not isinstance(data, str):
|
|
106
|
+
raise TypeError()
|
|
107
|
+
componentsschemas_local_date_nullable_type_1 = datetime.date.fromisoformat(data)
|
|
108
|
+
|
|
109
|
+
return componentsschemas_local_date_nullable_type_1
|
|
110
|
+
except (TypeError, ValueError, AttributeError, KeyError):
|
|
111
|
+
pass
|
|
112
|
+
return cast(datetime.date | None, data)
|
|
113
|
+
|
|
114
|
+
date_of_birth = _parse_date_of_birth(d.pop("date_of_birth"))
|
|
115
|
+
|
|
116
|
+
def _parse_genotype(data: object) -> None | str:
|
|
117
|
+
if data is None:
|
|
118
|
+
return data
|
|
119
|
+
return cast(None | str, data)
|
|
120
|
+
|
|
121
|
+
genotype = _parse_genotype(d.pop("genotype"))
|
|
122
|
+
|
|
123
|
+
subject_lookup_response = cls(
|
|
124
|
+
valid=valid,
|
|
125
|
+
subject_id=subject_id,
|
|
126
|
+
detail=detail,
|
|
127
|
+
sex=sex,
|
|
128
|
+
date_of_birth=date_of_birth,
|
|
129
|
+
genotype=genotype,
|
|
130
|
+
)
|
|
131
|
+
|
|
132
|
+
subject_lookup_response.additional_properties = d
|
|
133
|
+
return subject_lookup_response
|
|
134
|
+
|
|
135
|
+
@property
|
|
136
|
+
def additional_keys(self) -> list[str]:
|
|
137
|
+
return list(self.additional_properties.keys())
|
|
138
|
+
|
|
139
|
+
def __getitem__(self, key: str) -> Any:
|
|
140
|
+
return self.additional_properties[key]
|
|
141
|
+
|
|
142
|
+
def __setitem__(self, key: str, value: Any) -> None:
|
|
143
|
+
self.additional_properties[key] = value
|
|
144
|
+
|
|
145
|
+
def __delitem__(self, key: str) -> None:
|
|
146
|
+
del self.additional_properties[key]
|
|
147
|
+
|
|
148
|
+
def __contains__(self, key: str) -> bool:
|
|
149
|
+
return key in self.additional_properties
|
|
@@ -0,0 +1,128 @@
|
|
|
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
|
+
import datetime
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
T = TypeVar("T", bound="SubjectResponse")
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
@_attrs_define
|
|
19
|
+
class SubjectResponse:
|
|
20
|
+
"""
|
|
21
|
+
Attributes:
|
|
22
|
+
id (str):
|
|
23
|
+
sex (None | str):
|
|
24
|
+
date_of_birth (datetime.date | None):
|
|
25
|
+
genotype (None | str):
|
|
26
|
+
validated_at (datetime.datetime): UTC instant, ISO 8601 with offset, e.g. 2026-10-15T16:00:00Z.
|
|
27
|
+
"""
|
|
28
|
+
|
|
29
|
+
id: str
|
|
30
|
+
sex: None | str
|
|
31
|
+
date_of_birth: datetime.date | None
|
|
32
|
+
genotype: None | str
|
|
33
|
+
validated_at: datetime.datetime
|
|
34
|
+
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
|
|
35
|
+
|
|
36
|
+
def to_dict(self) -> dict[str, Any]:
|
|
37
|
+
id = self.id
|
|
38
|
+
|
|
39
|
+
sex: None | str
|
|
40
|
+
sex = self.sex
|
|
41
|
+
|
|
42
|
+
date_of_birth: None | str
|
|
43
|
+
if isinstance(self.date_of_birth, datetime.date):
|
|
44
|
+
date_of_birth = self.date_of_birth.isoformat()
|
|
45
|
+
else:
|
|
46
|
+
date_of_birth = self.date_of_birth
|
|
47
|
+
|
|
48
|
+
genotype: None | str
|
|
49
|
+
genotype = self.genotype
|
|
50
|
+
|
|
51
|
+
validated_at = self.validated_at.isoformat()
|
|
52
|
+
|
|
53
|
+
field_dict: dict[str, Any] = {}
|
|
54
|
+
field_dict.update(self.additional_properties)
|
|
55
|
+
field_dict.update(
|
|
56
|
+
{
|
|
57
|
+
"id": id,
|
|
58
|
+
"sex": sex,
|
|
59
|
+
"date_of_birth": date_of_birth,
|
|
60
|
+
"genotype": genotype,
|
|
61
|
+
"validated_at": validated_at,
|
|
62
|
+
}
|
|
63
|
+
)
|
|
64
|
+
|
|
65
|
+
return field_dict
|
|
66
|
+
|
|
67
|
+
@classmethod
|
|
68
|
+
def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
|
|
69
|
+
d = dict(src_dict)
|
|
70
|
+
id = d.pop("id")
|
|
71
|
+
|
|
72
|
+
def _parse_sex(data: object) -> None | str:
|
|
73
|
+
if data is None:
|
|
74
|
+
return data
|
|
75
|
+
return cast(None | str, data)
|
|
76
|
+
|
|
77
|
+
sex = _parse_sex(d.pop("sex"))
|
|
78
|
+
|
|
79
|
+
def _parse_date_of_birth(data: object) -> datetime.date | None:
|
|
80
|
+
if data is None:
|
|
81
|
+
return data
|
|
82
|
+
try:
|
|
83
|
+
if not isinstance(data, str):
|
|
84
|
+
raise TypeError()
|
|
85
|
+
componentsschemas_local_date_nullable_type_1 = datetime.date.fromisoformat(data)
|
|
86
|
+
|
|
87
|
+
return componentsschemas_local_date_nullable_type_1
|
|
88
|
+
except (TypeError, ValueError, AttributeError, KeyError):
|
|
89
|
+
pass
|
|
90
|
+
return cast(datetime.date | None, data)
|
|
91
|
+
|
|
92
|
+
date_of_birth = _parse_date_of_birth(d.pop("date_of_birth"))
|
|
93
|
+
|
|
94
|
+
def _parse_genotype(data: object) -> None | str:
|
|
95
|
+
if data is None:
|
|
96
|
+
return data
|
|
97
|
+
return cast(None | str, data)
|
|
98
|
+
|
|
99
|
+
genotype = _parse_genotype(d.pop("genotype"))
|
|
100
|
+
|
|
101
|
+
validated_at = datetime.datetime.fromisoformat(d.pop("validated_at"))
|
|
102
|
+
|
|
103
|
+
subject_response = cls(
|
|
104
|
+
id=id,
|
|
105
|
+
sex=sex,
|
|
106
|
+
date_of_birth=date_of_birth,
|
|
107
|
+
genotype=genotype,
|
|
108
|
+
validated_at=validated_at,
|
|
109
|
+
)
|
|
110
|
+
|
|
111
|
+
subject_response.additional_properties = d
|
|
112
|
+
return subject_response
|
|
113
|
+
|
|
114
|
+
@property
|
|
115
|
+
def additional_keys(self) -> list[str]:
|
|
116
|
+
return list(self.additional_properties.keys())
|
|
117
|
+
|
|
118
|
+
def __getitem__(self, key: str) -> Any:
|
|
119
|
+
return self.additional_properties[key]
|
|
120
|
+
|
|
121
|
+
def __setitem__(self, key: str, value: Any) -> None:
|
|
122
|
+
self.additional_properties[key] = value
|
|
123
|
+
|
|
124
|
+
def __delitem__(self, key: str) -> None:
|
|
125
|
+
del self.additional_properties[key]
|
|
126
|
+
|
|
127
|
+
def __contains__(self, key: str) -> bool:
|
|
128
|
+
return key in self.additional_properties
|
|
@@ -0,0 +1,80 @@
|
|
|
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
|
+
|
|
12
|
+
T = TypeVar("T", bound="SyncCounts")
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
@_attrs_define
|
|
16
|
+
class SyncCounts:
|
|
17
|
+
"""
|
|
18
|
+
Attributes:
|
|
19
|
+
created (int):
|
|
20
|
+
updated (int):
|
|
21
|
+
unchanged (int):
|
|
22
|
+
"""
|
|
23
|
+
|
|
24
|
+
created: int
|
|
25
|
+
updated: int
|
|
26
|
+
unchanged: int
|
|
27
|
+
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
|
|
28
|
+
|
|
29
|
+
def to_dict(self) -> dict[str, Any]:
|
|
30
|
+
created = self.created
|
|
31
|
+
|
|
32
|
+
updated = self.updated
|
|
33
|
+
|
|
34
|
+
unchanged = self.unchanged
|
|
35
|
+
|
|
36
|
+
field_dict: dict[str, Any] = {}
|
|
37
|
+
field_dict.update(self.additional_properties)
|
|
38
|
+
field_dict.update(
|
|
39
|
+
{
|
|
40
|
+
"created": created,
|
|
41
|
+
"updated": updated,
|
|
42
|
+
"unchanged": unchanged,
|
|
43
|
+
}
|
|
44
|
+
)
|
|
45
|
+
|
|
46
|
+
return field_dict
|
|
47
|
+
|
|
48
|
+
@classmethod
|
|
49
|
+
def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
|
|
50
|
+
d = dict(src_dict)
|
|
51
|
+
created = d.pop("created")
|
|
52
|
+
|
|
53
|
+
updated = d.pop("updated")
|
|
54
|
+
|
|
55
|
+
unchanged = d.pop("unchanged")
|
|
56
|
+
|
|
57
|
+
sync_counts = cls(
|
|
58
|
+
created=created,
|
|
59
|
+
updated=updated,
|
|
60
|
+
unchanged=unchanged,
|
|
61
|
+
)
|
|
62
|
+
|
|
63
|
+
sync_counts.additional_properties = d
|
|
64
|
+
return sync_counts
|
|
65
|
+
|
|
66
|
+
@property
|
|
67
|
+
def additional_keys(self) -> list[str]:
|
|
68
|
+
return list(self.additional_properties.keys())
|
|
69
|
+
|
|
70
|
+
def __getitem__(self, key: str) -> Any:
|
|
71
|
+
return self.additional_properties[key]
|
|
72
|
+
|
|
73
|
+
def __setitem__(self, key: str, value: Any) -> None:
|
|
74
|
+
self.additional_properties[key] = value
|
|
75
|
+
|
|
76
|
+
def __delitem__(self, key: str) -> None:
|
|
77
|
+
del self.additional_properties[key]
|
|
78
|
+
|
|
79
|
+
def __contains__(self, key: str) -> bool:
|
|
80
|
+
return key in self.additional_properties
|
|
@@ -0,0 +1,81 @@
|
|
|
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.sync_counts import SyncCounts
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
T = TypeVar("T", bound="SyncResponse")
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
@_attrs_define
|
|
21
|
+
class SyncResponse:
|
|
22
|
+
"""
|
|
23
|
+
Attributes:
|
|
24
|
+
instruments (SyncCounts):
|
|
25
|
+
projects (SyncCounts):
|
|
26
|
+
"""
|
|
27
|
+
|
|
28
|
+
instruments: SyncCounts
|
|
29
|
+
projects: SyncCounts
|
|
30
|
+
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
|
|
31
|
+
|
|
32
|
+
def to_dict(self) -> dict[str, Any]:
|
|
33
|
+
from ..models.sync_counts import SyncCounts
|
|
34
|
+
|
|
35
|
+
instruments = self.instruments.to_dict()
|
|
36
|
+
|
|
37
|
+
projects = self.projects.to_dict()
|
|
38
|
+
|
|
39
|
+
field_dict: dict[str, Any] = {}
|
|
40
|
+
field_dict.update(self.additional_properties)
|
|
41
|
+
field_dict.update(
|
|
42
|
+
{
|
|
43
|
+
"instruments": instruments,
|
|
44
|
+
"projects": projects,
|
|
45
|
+
}
|
|
46
|
+
)
|
|
47
|
+
|
|
48
|
+
return field_dict
|
|
49
|
+
|
|
50
|
+
@classmethod
|
|
51
|
+
def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
|
|
52
|
+
from ..models.sync_counts import SyncCounts
|
|
53
|
+
|
|
54
|
+
d = dict(src_dict)
|
|
55
|
+
instruments = SyncCounts.from_dict(d.pop("instruments"))
|
|
56
|
+
|
|
57
|
+
projects = SyncCounts.from_dict(d.pop("projects"))
|
|
58
|
+
|
|
59
|
+
sync_response = cls(
|
|
60
|
+
instruments=instruments,
|
|
61
|
+
projects=projects,
|
|
62
|
+
)
|
|
63
|
+
|
|
64
|
+
sync_response.additional_properties = d
|
|
65
|
+
return sync_response
|
|
66
|
+
|
|
67
|
+
@property
|
|
68
|
+
def additional_keys(self) -> list[str]:
|
|
69
|
+
return list(self.additional_properties.keys())
|
|
70
|
+
|
|
71
|
+
def __getitem__(self, key: str) -> Any:
|
|
72
|
+
return self.additional_properties[key]
|
|
73
|
+
|
|
74
|
+
def __setitem__(self, key: str, value: Any) -> None:
|
|
75
|
+
self.additional_properties[key] = value
|
|
76
|
+
|
|
77
|
+
def __delitem__(self, key: str) -> None:
|
|
78
|
+
del self.additional_properties[key]
|
|
79
|
+
|
|
80
|
+
def __contains__(self, key: str) -> bool:
|
|
81
|
+
return key in self.additional_properties
|