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,93 @@
|
|
|
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.fip_color import FipColor
|
|
12
|
+
from ..types import UNSET, Unset
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
T = TypeVar("T", bound="FipFiber")
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
@_attrs_define
|
|
19
|
+
class FipFiber:
|
|
20
|
+
"""One implanted fiber.
|
|
21
|
+
|
|
22
|
+
Attributes:
|
|
23
|
+
location (str): Implant location, e.g. `mPFC`. Trimmed; must not be blank.
|
|
24
|
+
patch_cord_number (int): Patch cord the fiber connects to; unique across fibers, zero or greater.
|
|
25
|
+
color (FipColor): Fiber color. Accepted case-insensitively, stored and returned in canonical casing.
|
|
26
|
+
enabled (bool | Unset): Disabled fibers are stored and still count toward uniqueness. Default: True.
|
|
27
|
+
"""
|
|
28
|
+
|
|
29
|
+
location: str
|
|
30
|
+
patch_cord_number: int
|
|
31
|
+
color: FipColor
|
|
32
|
+
enabled: bool | Unset = True
|
|
33
|
+
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
|
|
34
|
+
|
|
35
|
+
def to_dict(self) -> dict[str, Any]:
|
|
36
|
+
location = self.location
|
|
37
|
+
|
|
38
|
+
patch_cord_number = self.patch_cord_number
|
|
39
|
+
|
|
40
|
+
color = self.color.value
|
|
41
|
+
|
|
42
|
+
enabled = self.enabled
|
|
43
|
+
|
|
44
|
+
field_dict: dict[str, Any] = {}
|
|
45
|
+
field_dict.update(self.additional_properties)
|
|
46
|
+
field_dict.update(
|
|
47
|
+
{
|
|
48
|
+
"location": location,
|
|
49
|
+
"patch_cord_number": patch_cord_number,
|
|
50
|
+
"color": color,
|
|
51
|
+
}
|
|
52
|
+
)
|
|
53
|
+
if enabled is not UNSET:
|
|
54
|
+
field_dict["enabled"] = enabled
|
|
55
|
+
|
|
56
|
+
return field_dict
|
|
57
|
+
|
|
58
|
+
@classmethod
|
|
59
|
+
def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
|
|
60
|
+
d = dict(src_dict)
|
|
61
|
+
location = d.pop("location")
|
|
62
|
+
|
|
63
|
+
patch_cord_number = d.pop("patch_cord_number")
|
|
64
|
+
|
|
65
|
+
color = FipColor(d.pop("color"))
|
|
66
|
+
|
|
67
|
+
enabled = d.pop("enabled", UNSET)
|
|
68
|
+
|
|
69
|
+
fip_fiber = cls(
|
|
70
|
+
location=location,
|
|
71
|
+
patch_cord_number=patch_cord_number,
|
|
72
|
+
color=color,
|
|
73
|
+
enabled=enabled,
|
|
74
|
+
)
|
|
75
|
+
|
|
76
|
+
fip_fiber.additional_properties = d
|
|
77
|
+
return fip_fiber
|
|
78
|
+
|
|
79
|
+
@property
|
|
80
|
+
def additional_keys(self) -> list[str]:
|
|
81
|
+
return list(self.additional_properties.keys())
|
|
82
|
+
|
|
83
|
+
def __getitem__(self, key: str) -> Any:
|
|
84
|
+
return self.additional_properties[key]
|
|
85
|
+
|
|
86
|
+
def __setitem__(self, key: str, value: Any) -> None:
|
|
87
|
+
self.additional_properties[key] = value
|
|
88
|
+
|
|
89
|
+
def __delitem__(self, key: str) -> None:
|
|
90
|
+
del self.additional_properties[key]
|
|
91
|
+
|
|
92
|
+
def __contains__(self, key: str) -> bool:
|
|
93
|
+
return key in self.additional_properties
|
|
@@ -0,0 +1,82 @@
|
|
|
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.fip_settings import FipSettings
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
T = TypeVar("T", bound="FipPushSettingsRequest")
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
@_attrs_define
|
|
21
|
+
class FipPushSettingsRequest:
|
|
22
|
+
"""Push a new settings version for a subject.
|
|
23
|
+
|
|
24
|
+
Attributes:
|
|
25
|
+
subject_id (str): Subject the settings apply to; validated against the metadata service.
|
|
26
|
+
settings (FipSettings): FIP (fiber photometry) settings for one subject. One live version per subject.
|
|
27
|
+
"""
|
|
28
|
+
|
|
29
|
+
subject_id: str
|
|
30
|
+
settings: FipSettings
|
|
31
|
+
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
|
|
32
|
+
|
|
33
|
+
def to_dict(self) -> dict[str, Any]:
|
|
34
|
+
from ..models.fip_settings import FipSettings
|
|
35
|
+
|
|
36
|
+
subject_id = self.subject_id
|
|
37
|
+
|
|
38
|
+
settings = self.settings.to_dict()
|
|
39
|
+
|
|
40
|
+
field_dict: dict[str, Any] = {}
|
|
41
|
+
field_dict.update(self.additional_properties)
|
|
42
|
+
field_dict.update(
|
|
43
|
+
{
|
|
44
|
+
"subject_id": subject_id,
|
|
45
|
+
"settings": settings,
|
|
46
|
+
}
|
|
47
|
+
)
|
|
48
|
+
|
|
49
|
+
return field_dict
|
|
50
|
+
|
|
51
|
+
@classmethod
|
|
52
|
+
def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
|
|
53
|
+
from ..models.fip_settings import FipSettings
|
|
54
|
+
|
|
55
|
+
d = dict(src_dict)
|
|
56
|
+
subject_id = d.pop("subject_id")
|
|
57
|
+
|
|
58
|
+
settings = FipSettings.from_dict(d.pop("settings"))
|
|
59
|
+
|
|
60
|
+
fip_push_settings_request = cls(
|
|
61
|
+
subject_id=subject_id,
|
|
62
|
+
settings=settings,
|
|
63
|
+
)
|
|
64
|
+
|
|
65
|
+
fip_push_settings_request.additional_properties = d
|
|
66
|
+
return fip_push_settings_request
|
|
67
|
+
|
|
68
|
+
@property
|
|
69
|
+
def additional_keys(self) -> list[str]:
|
|
70
|
+
return list(self.additional_properties.keys())
|
|
71
|
+
|
|
72
|
+
def __getitem__(self, key: str) -> Any:
|
|
73
|
+
return self.additional_properties[key]
|
|
74
|
+
|
|
75
|
+
def __setitem__(self, key: str, value: Any) -> None:
|
|
76
|
+
self.additional_properties[key] = value
|
|
77
|
+
|
|
78
|
+
def __delitem__(self, key: str) -> None:
|
|
79
|
+
del self.additional_properties[key]
|
|
80
|
+
|
|
81
|
+
def __contains__(self, key: str) -> bool:
|
|
82
|
+
return key in self.additional_properties
|
|
@@ -0,0 +1,91 @@
|
|
|
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.fip_mode import FipMode
|
|
12
|
+
from typing import cast
|
|
13
|
+
|
|
14
|
+
if TYPE_CHECKING:
|
|
15
|
+
from ..models.fip_fiber import FipFiber
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
T = TypeVar("T", bound="FipSettings")
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
@_attrs_define
|
|
22
|
+
class FipSettings:
|
|
23
|
+
"""FIP (fiber photometry) settings for one subject. One live version per subject.
|
|
24
|
+
|
|
25
|
+
Attributes:
|
|
26
|
+
mode (FipMode): Fiber photometry acquisition mode.
|
|
27
|
+
fibers (list[FipFiber]): Fibers; may be empty.
|
|
28
|
+
"""
|
|
29
|
+
|
|
30
|
+
mode: FipMode
|
|
31
|
+
fibers: list[FipFiber]
|
|
32
|
+
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
|
|
33
|
+
|
|
34
|
+
def to_dict(self) -> dict[str, Any]:
|
|
35
|
+
from ..models.fip_fiber import FipFiber
|
|
36
|
+
|
|
37
|
+
mode = self.mode.value
|
|
38
|
+
|
|
39
|
+
fibers = []
|
|
40
|
+
for fibers_item_data in self.fibers:
|
|
41
|
+
fibers_item = fibers_item_data.to_dict()
|
|
42
|
+
fibers.append(fibers_item)
|
|
43
|
+
|
|
44
|
+
field_dict: dict[str, Any] = {}
|
|
45
|
+
field_dict.update(self.additional_properties)
|
|
46
|
+
field_dict.update(
|
|
47
|
+
{
|
|
48
|
+
"mode": mode,
|
|
49
|
+
"fibers": fibers,
|
|
50
|
+
}
|
|
51
|
+
)
|
|
52
|
+
|
|
53
|
+
return field_dict
|
|
54
|
+
|
|
55
|
+
@classmethod
|
|
56
|
+
def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
|
|
57
|
+
from ..models.fip_fiber import FipFiber
|
|
58
|
+
|
|
59
|
+
d = dict(src_dict)
|
|
60
|
+
mode = FipMode(d.pop("mode"))
|
|
61
|
+
|
|
62
|
+
fibers = []
|
|
63
|
+
_fibers = d.pop("fibers")
|
|
64
|
+
for fibers_item_data in _fibers:
|
|
65
|
+
fibers_item = FipFiber.from_dict(fibers_item_data)
|
|
66
|
+
|
|
67
|
+
fibers.append(fibers_item)
|
|
68
|
+
|
|
69
|
+
fip_settings = cls(
|
|
70
|
+
mode=mode,
|
|
71
|
+
fibers=fibers,
|
|
72
|
+
)
|
|
73
|
+
|
|
74
|
+
fip_settings.additional_properties = d
|
|
75
|
+
return fip_settings
|
|
76
|
+
|
|
77
|
+
@property
|
|
78
|
+
def additional_keys(self) -> list[str]:
|
|
79
|
+
return list(self.additional_properties.keys())
|
|
80
|
+
|
|
81
|
+
def __getitem__(self, key: str) -> Any:
|
|
82
|
+
return self.additional_properties[key]
|
|
83
|
+
|
|
84
|
+
def __setitem__(self, key: str, value: Any) -> None:
|
|
85
|
+
self.additional_properties[key] = value
|
|
86
|
+
|
|
87
|
+
def __delitem__(self, key: str) -> None:
|
|
88
|
+
del self.additional_properties[key]
|
|
89
|
+
|
|
90
|
+
def __contains__(self, key: str) -> bool:
|
|
91
|
+
return key in self.additional_properties
|
|
@@ -0,0 +1,97 @@
|
|
|
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.fip_settings import FipSettings
|
|
15
|
+
from ..models.fip_settings_preview_response_promoted import FipSettingsPreviewResponsePromoted
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
T = TypeVar("T", bound="FipSettingsPreviewResponse")
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
@_attrs_define
|
|
22
|
+
class FipSettingsPreviewResponse:
|
|
23
|
+
"""What a push of this payload would store, without storing it.
|
|
24
|
+
|
|
25
|
+
Attributes:
|
|
26
|
+
settings (FipSettings): FIP (fiber photometry) settings for one subject. One live version per subject.
|
|
27
|
+
live_scope (str): Live scope the payload belongs to.
|
|
28
|
+
promoted (FipSettingsPreviewResponsePromoted): Promoted filter fields and their values.
|
|
29
|
+
"""
|
|
30
|
+
|
|
31
|
+
settings: FipSettings
|
|
32
|
+
live_scope: str
|
|
33
|
+
promoted: FipSettingsPreviewResponsePromoted
|
|
34
|
+
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
|
|
35
|
+
|
|
36
|
+
def to_dict(self) -> dict[str, Any]:
|
|
37
|
+
from ..models.fip_settings import FipSettings
|
|
38
|
+
from ..models.fip_settings_preview_response_promoted import (
|
|
39
|
+
FipSettingsPreviewResponsePromoted,
|
|
40
|
+
)
|
|
41
|
+
|
|
42
|
+
settings = self.settings.to_dict()
|
|
43
|
+
|
|
44
|
+
live_scope = self.live_scope
|
|
45
|
+
|
|
46
|
+
promoted = self.promoted.to_dict()
|
|
47
|
+
|
|
48
|
+
field_dict: dict[str, Any] = {}
|
|
49
|
+
field_dict.update(self.additional_properties)
|
|
50
|
+
field_dict.update(
|
|
51
|
+
{
|
|
52
|
+
"settings": settings,
|
|
53
|
+
"live_scope": live_scope,
|
|
54
|
+
"promoted": promoted,
|
|
55
|
+
}
|
|
56
|
+
)
|
|
57
|
+
|
|
58
|
+
return field_dict
|
|
59
|
+
|
|
60
|
+
@classmethod
|
|
61
|
+
def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
|
|
62
|
+
from ..models.fip_settings import FipSettings
|
|
63
|
+
from ..models.fip_settings_preview_response_promoted import (
|
|
64
|
+
FipSettingsPreviewResponsePromoted,
|
|
65
|
+
)
|
|
66
|
+
|
|
67
|
+
d = dict(src_dict)
|
|
68
|
+
settings = FipSettings.from_dict(d.pop("settings"))
|
|
69
|
+
|
|
70
|
+
live_scope = d.pop("live_scope")
|
|
71
|
+
|
|
72
|
+
promoted = FipSettingsPreviewResponsePromoted.from_dict(d.pop("promoted"))
|
|
73
|
+
|
|
74
|
+
fip_settings_preview_response = cls(
|
|
75
|
+
settings=settings,
|
|
76
|
+
live_scope=live_scope,
|
|
77
|
+
promoted=promoted,
|
|
78
|
+
)
|
|
79
|
+
|
|
80
|
+
fip_settings_preview_response.additional_properties = d
|
|
81
|
+
return fip_settings_preview_response
|
|
82
|
+
|
|
83
|
+
@property
|
|
84
|
+
def additional_keys(self) -> list[str]:
|
|
85
|
+
return list(self.additional_properties.keys())
|
|
86
|
+
|
|
87
|
+
def __getitem__(self, key: str) -> Any:
|
|
88
|
+
return self.additional_properties[key]
|
|
89
|
+
|
|
90
|
+
def __setitem__(self, key: str, value: Any) -> None:
|
|
91
|
+
self.additional_properties[key] = value
|
|
92
|
+
|
|
93
|
+
def __delitem__(self, key: str) -> None:
|
|
94
|
+
del self.additional_properties[key]
|
|
95
|
+
|
|
96
|
+
def __contains__(self, key: str) -> bool:
|
|
97
|
+
return key in self.additional_properties
|
|
@@ -0,0 +1,50 @@
|
|
|
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="FipSettingsPreviewResponsePromoted")
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
@_attrs_define
|
|
16
|
+
class FipSettingsPreviewResponsePromoted:
|
|
17
|
+
"""Promoted filter fields and their values."""
|
|
18
|
+
|
|
19
|
+
additional_properties: dict[str, str] = _attrs_field(init=False, factory=dict)
|
|
20
|
+
|
|
21
|
+
def to_dict(self) -> dict[str, Any]:
|
|
22
|
+
|
|
23
|
+
field_dict: dict[str, Any] = {}
|
|
24
|
+
field_dict.update(self.additional_properties)
|
|
25
|
+
|
|
26
|
+
return field_dict
|
|
27
|
+
|
|
28
|
+
@classmethod
|
|
29
|
+
def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
|
|
30
|
+
d = dict(src_dict)
|
|
31
|
+
fip_settings_preview_response_promoted = cls()
|
|
32
|
+
|
|
33
|
+
fip_settings_preview_response_promoted.additional_properties = d
|
|
34
|
+
return fip_settings_preview_response_promoted
|
|
35
|
+
|
|
36
|
+
@property
|
|
37
|
+
def additional_keys(self) -> list[str]:
|
|
38
|
+
return list(self.additional_properties.keys())
|
|
39
|
+
|
|
40
|
+
def __getitem__(self, key: str) -> str:
|
|
41
|
+
return self.additional_properties[key]
|
|
42
|
+
|
|
43
|
+
def __setitem__(self, key: str, value: str) -> None:
|
|
44
|
+
self.additional_properties[key] = value
|
|
45
|
+
|
|
46
|
+
def __delitem__(self, key: str) -> None:
|
|
47
|
+
del self.additional_properties[key]
|
|
48
|
+
|
|
49
|
+
def __contains__(self, key: str) -> bool:
|
|
50
|
+
return key in self.additional_properties
|
|
@@ -0,0 +1,155 @@
|
|
|
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
|
+
if TYPE_CHECKING:
|
|
15
|
+
from ..models.fip_settings import FipSettings
|
|
16
|
+
from ..models.fip_settings_version_response_promoted import FipSettingsVersionResponsePromoted
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
T = TypeVar("T", bound="FipSettingsVersionResponse")
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
@_attrs_define
|
|
23
|
+
class FipSettingsVersionResponse:
|
|
24
|
+
"""One immutable settings version.
|
|
25
|
+
|
|
26
|
+
Attributes:
|
|
27
|
+
id (int): Version id; schedules pin it and run snapshots reference it.
|
|
28
|
+
subject_id (str): Canonical subject id.
|
|
29
|
+
live_scope (str): Scope within the subject; empty when the type has one live version per subject.
|
|
30
|
+
pushed_at (datetime.datetime): UTC instant, ISO 8601 with offset, e.g. 2026-10-15T16:00:00Z.
|
|
31
|
+
superseded_at (datetime.datetime | None):
|
|
32
|
+
pushed_by (str): Display name of the pusher; unverified while authentication is disabled.
|
|
33
|
+
settings (FipSettings): FIP (fiber photometry) settings for one subject. One live version per subject.
|
|
34
|
+
promoted (FipSettingsVersionResponsePromoted): Promoted filter fields and their values.
|
|
35
|
+
"""
|
|
36
|
+
|
|
37
|
+
id: int
|
|
38
|
+
subject_id: str
|
|
39
|
+
live_scope: str
|
|
40
|
+
pushed_at: datetime.datetime
|
|
41
|
+
superseded_at: datetime.datetime | None
|
|
42
|
+
pushed_by: str
|
|
43
|
+
settings: FipSettings
|
|
44
|
+
promoted: FipSettingsVersionResponsePromoted
|
|
45
|
+
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
|
|
46
|
+
|
|
47
|
+
def to_dict(self) -> dict[str, Any]:
|
|
48
|
+
from ..models.fip_settings import FipSettings
|
|
49
|
+
from ..models.fip_settings_version_response_promoted import (
|
|
50
|
+
FipSettingsVersionResponsePromoted,
|
|
51
|
+
)
|
|
52
|
+
|
|
53
|
+
id = self.id
|
|
54
|
+
|
|
55
|
+
subject_id = self.subject_id
|
|
56
|
+
|
|
57
|
+
live_scope = self.live_scope
|
|
58
|
+
|
|
59
|
+
pushed_at = self.pushed_at.isoformat()
|
|
60
|
+
|
|
61
|
+
superseded_at: None | str
|
|
62
|
+
if isinstance(self.superseded_at, datetime.datetime):
|
|
63
|
+
superseded_at = self.superseded_at.isoformat()
|
|
64
|
+
else:
|
|
65
|
+
superseded_at = self.superseded_at
|
|
66
|
+
|
|
67
|
+
pushed_by = self.pushed_by
|
|
68
|
+
|
|
69
|
+
settings = self.settings.to_dict()
|
|
70
|
+
|
|
71
|
+
promoted = self.promoted.to_dict()
|
|
72
|
+
|
|
73
|
+
field_dict: dict[str, Any] = {}
|
|
74
|
+
field_dict.update(self.additional_properties)
|
|
75
|
+
field_dict.update(
|
|
76
|
+
{
|
|
77
|
+
"id": id,
|
|
78
|
+
"subject_id": subject_id,
|
|
79
|
+
"live_scope": live_scope,
|
|
80
|
+
"pushed_at": pushed_at,
|
|
81
|
+
"superseded_at": superseded_at,
|
|
82
|
+
"pushed_by": pushed_by,
|
|
83
|
+
"settings": settings,
|
|
84
|
+
"promoted": promoted,
|
|
85
|
+
}
|
|
86
|
+
)
|
|
87
|
+
|
|
88
|
+
return field_dict
|
|
89
|
+
|
|
90
|
+
@classmethod
|
|
91
|
+
def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
|
|
92
|
+
from ..models.fip_settings import FipSettings
|
|
93
|
+
from ..models.fip_settings_version_response_promoted import (
|
|
94
|
+
FipSettingsVersionResponsePromoted,
|
|
95
|
+
)
|
|
96
|
+
|
|
97
|
+
d = dict(src_dict)
|
|
98
|
+
id = d.pop("id")
|
|
99
|
+
|
|
100
|
+
subject_id = d.pop("subject_id")
|
|
101
|
+
|
|
102
|
+
live_scope = d.pop("live_scope")
|
|
103
|
+
|
|
104
|
+
pushed_at = datetime.datetime.fromisoformat(d.pop("pushed_at"))
|
|
105
|
+
|
|
106
|
+
def _parse_superseded_at(data: object) -> datetime.datetime | None:
|
|
107
|
+
if data is None:
|
|
108
|
+
return data
|
|
109
|
+
try:
|
|
110
|
+
if not isinstance(data, str):
|
|
111
|
+
raise TypeError()
|
|
112
|
+
componentsschemas_instant_nullable_type_1 = datetime.datetime.fromisoformat(data)
|
|
113
|
+
|
|
114
|
+
return componentsschemas_instant_nullable_type_1
|
|
115
|
+
except (TypeError, ValueError, AttributeError, KeyError):
|
|
116
|
+
pass
|
|
117
|
+
return cast(datetime.datetime | None, data)
|
|
118
|
+
|
|
119
|
+
superseded_at = _parse_superseded_at(d.pop("superseded_at"))
|
|
120
|
+
|
|
121
|
+
pushed_by = d.pop("pushed_by")
|
|
122
|
+
|
|
123
|
+
settings = FipSettings.from_dict(d.pop("settings"))
|
|
124
|
+
|
|
125
|
+
promoted = FipSettingsVersionResponsePromoted.from_dict(d.pop("promoted"))
|
|
126
|
+
|
|
127
|
+
fip_settings_version_response = cls(
|
|
128
|
+
id=id,
|
|
129
|
+
subject_id=subject_id,
|
|
130
|
+
live_scope=live_scope,
|
|
131
|
+
pushed_at=pushed_at,
|
|
132
|
+
superseded_at=superseded_at,
|
|
133
|
+
pushed_by=pushed_by,
|
|
134
|
+
settings=settings,
|
|
135
|
+
promoted=promoted,
|
|
136
|
+
)
|
|
137
|
+
|
|
138
|
+
fip_settings_version_response.additional_properties = d
|
|
139
|
+
return fip_settings_version_response
|
|
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
|
|
@@ -0,0 +1,50 @@
|
|
|
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="FipSettingsVersionResponsePromoted")
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
@_attrs_define
|
|
16
|
+
class FipSettingsVersionResponsePromoted:
|
|
17
|
+
"""Promoted filter fields and their values."""
|
|
18
|
+
|
|
19
|
+
additional_properties: dict[str, str] = _attrs_field(init=False, factory=dict)
|
|
20
|
+
|
|
21
|
+
def to_dict(self) -> dict[str, Any]:
|
|
22
|
+
|
|
23
|
+
field_dict: dict[str, Any] = {}
|
|
24
|
+
field_dict.update(self.additional_properties)
|
|
25
|
+
|
|
26
|
+
return field_dict
|
|
27
|
+
|
|
28
|
+
@classmethod
|
|
29
|
+
def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
|
|
30
|
+
d = dict(src_dict)
|
|
31
|
+
fip_settings_version_response_promoted = cls()
|
|
32
|
+
|
|
33
|
+
fip_settings_version_response_promoted.additional_properties = d
|
|
34
|
+
return fip_settings_version_response_promoted
|
|
35
|
+
|
|
36
|
+
@property
|
|
37
|
+
def additional_keys(self) -> list[str]:
|
|
38
|
+
return list(self.additional_properties.keys())
|
|
39
|
+
|
|
40
|
+
def __getitem__(self, key: str) -> str:
|
|
41
|
+
return self.additional_properties[key]
|
|
42
|
+
|
|
43
|
+
def __setitem__(self, key: str, value: str) -> None:
|
|
44
|
+
self.additional_properties[key] = value
|
|
45
|
+
|
|
46
|
+
def __delitem__(self, key: str) -> None:
|
|
47
|
+
del self.additional_properties[key]
|
|
48
|
+
|
|
49
|
+
def __contains__(self, key: str) -> bool:
|
|
50
|
+
return key in self.additional_properties
|