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,78 @@
|
|
|
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 ..types import UNSET, Unset
|
|
12
|
+
from typing import cast
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
T = TypeVar("T", bound="ArchiveScheduledAcquisitionRequest")
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
@_attrs_define
|
|
19
|
+
class ArchiveScheduledAcquisitionRequest:
|
|
20
|
+
"""Archive a scheduled acquisition: hidden from default listings and no longer runnable; history is kept.
|
|
21
|
+
|
|
22
|
+
Attributes:
|
|
23
|
+
expected_version (int | None | Unset): As for uint? SetPlanningStatusRequest.ExpectedVersion.
|
|
24
|
+
"""
|
|
25
|
+
|
|
26
|
+
expected_version: int | None | Unset = UNSET
|
|
27
|
+
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
|
|
28
|
+
|
|
29
|
+
def to_dict(self) -> dict[str, Any]:
|
|
30
|
+
expected_version: int | None | Unset
|
|
31
|
+
if isinstance(self.expected_version, Unset):
|
|
32
|
+
expected_version = UNSET
|
|
33
|
+
else:
|
|
34
|
+
expected_version = self.expected_version
|
|
35
|
+
|
|
36
|
+
field_dict: dict[str, Any] = {}
|
|
37
|
+
field_dict.update(self.additional_properties)
|
|
38
|
+
field_dict.update({})
|
|
39
|
+
if expected_version is not UNSET:
|
|
40
|
+
field_dict["expected_version"] = expected_version
|
|
41
|
+
|
|
42
|
+
return field_dict
|
|
43
|
+
|
|
44
|
+
@classmethod
|
|
45
|
+
def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
|
|
46
|
+
d = dict(src_dict)
|
|
47
|
+
|
|
48
|
+
def _parse_expected_version(data: object) -> int | None | Unset:
|
|
49
|
+
if data is None:
|
|
50
|
+
return data
|
|
51
|
+
if isinstance(data, Unset):
|
|
52
|
+
return data
|
|
53
|
+
return cast(int | None | Unset, data)
|
|
54
|
+
|
|
55
|
+
expected_version = _parse_expected_version(d.pop("expected_version", UNSET))
|
|
56
|
+
|
|
57
|
+
archive_scheduled_acquisition_request = cls(
|
|
58
|
+
expected_version=expected_version,
|
|
59
|
+
)
|
|
60
|
+
|
|
61
|
+
archive_scheduled_acquisition_request.additional_properties = d
|
|
62
|
+
return archive_scheduled_acquisition_request
|
|
63
|
+
|
|
64
|
+
@property
|
|
65
|
+
def additional_keys(self) -> list[str]:
|
|
66
|
+
return list(self.additional_properties.keys())
|
|
67
|
+
|
|
68
|
+
def __getitem__(self, key: str) -> Any:
|
|
69
|
+
return self.additional_properties[key]
|
|
70
|
+
|
|
71
|
+
def __setitem__(self, key: str, value: Any) -> None:
|
|
72
|
+
self.additional_properties[key] = value
|
|
73
|
+
|
|
74
|
+
def __delitem__(self, key: str) -> None:
|
|
75
|
+
del self.additional_properties[key]
|
|
76
|
+
|
|
77
|
+
def __contains__(self, key: str) -> bool:
|
|
78
|
+
return key in self.additional_properties
|
|
@@ -0,0 +1,66 @@
|
|
|
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="ArchiveTemplateRequest")
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
@_attrs_define
|
|
16
|
+
class ArchiveTemplateRequest:
|
|
17
|
+
"""Archive a template: hidden from default listings, its name free for reuse. Past uses are unaffected.
|
|
18
|
+
|
|
19
|
+
Attributes:
|
|
20
|
+
expected_version (int): The `version` the client last read. A stale value is rejected with 409
|
|
21
|
+
`version_conflict`.
|
|
22
|
+
"""
|
|
23
|
+
|
|
24
|
+
expected_version: int
|
|
25
|
+
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
|
|
26
|
+
|
|
27
|
+
def to_dict(self) -> dict[str, Any]:
|
|
28
|
+
expected_version = self.expected_version
|
|
29
|
+
|
|
30
|
+
field_dict: dict[str, Any] = {}
|
|
31
|
+
field_dict.update(self.additional_properties)
|
|
32
|
+
field_dict.update(
|
|
33
|
+
{
|
|
34
|
+
"expected_version": expected_version,
|
|
35
|
+
}
|
|
36
|
+
)
|
|
37
|
+
|
|
38
|
+
return field_dict
|
|
39
|
+
|
|
40
|
+
@classmethod
|
|
41
|
+
def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
|
|
42
|
+
d = dict(src_dict)
|
|
43
|
+
expected_version = d.pop("expected_version")
|
|
44
|
+
|
|
45
|
+
archive_template_request = cls(
|
|
46
|
+
expected_version=expected_version,
|
|
47
|
+
)
|
|
48
|
+
|
|
49
|
+
archive_template_request.additional_properties = d
|
|
50
|
+
return archive_template_request
|
|
51
|
+
|
|
52
|
+
@property
|
|
53
|
+
def additional_keys(self) -> list[str]:
|
|
54
|
+
return list(self.additional_properties.keys())
|
|
55
|
+
|
|
56
|
+
def __getitem__(self, key: str) -> Any:
|
|
57
|
+
return self.additional_properties[key]
|
|
58
|
+
|
|
59
|
+
def __setitem__(self, key: str, value: Any) -> None:
|
|
60
|
+
self.additional_properties[key] = value
|
|
61
|
+
|
|
62
|
+
def __delitem__(self, key: str) -> None:
|
|
63
|
+
del self.additional_properties[key]
|
|
64
|
+
|
|
65
|
+
def __contains__(self, key: str) -> bool:
|
|
66
|
+
return key in self.additional_properties
|
|
@@ -0,0 +1,85 @@
|
|
|
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.behavior_curriculum_settings import BehaviorCurriculumSettings
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
T = TypeVar("T", bound="BehaviorCurriculumPushSettingsRequest")
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
@_attrs_define
|
|
21
|
+
class BehaviorCurriculumPushSettingsRequest:
|
|
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 (BehaviorCurriculumSettings): A curriculum/trainer-state document owned by the downstream training
|
|
27
|
+
software. Any JSON object; stored exactly as pushed. Docket reads only
|
|
28
|
+
`stage.task.name`, `curriculum.name`, `curriculum.version` and
|
|
29
|
+
`is_on_curriculum`.
|
|
30
|
+
"""
|
|
31
|
+
|
|
32
|
+
subject_id: str
|
|
33
|
+
settings: BehaviorCurriculumSettings
|
|
34
|
+
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
|
|
35
|
+
|
|
36
|
+
def to_dict(self) -> dict[str, Any]:
|
|
37
|
+
from ..models.behavior_curriculum_settings import BehaviorCurriculumSettings
|
|
38
|
+
|
|
39
|
+
subject_id = self.subject_id
|
|
40
|
+
|
|
41
|
+
settings = self.settings.to_dict()
|
|
42
|
+
|
|
43
|
+
field_dict: dict[str, Any] = {}
|
|
44
|
+
field_dict.update(self.additional_properties)
|
|
45
|
+
field_dict.update(
|
|
46
|
+
{
|
|
47
|
+
"subject_id": subject_id,
|
|
48
|
+
"settings": settings,
|
|
49
|
+
}
|
|
50
|
+
)
|
|
51
|
+
|
|
52
|
+
return field_dict
|
|
53
|
+
|
|
54
|
+
@classmethod
|
|
55
|
+
def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
|
|
56
|
+
from ..models.behavior_curriculum_settings import BehaviorCurriculumSettings
|
|
57
|
+
|
|
58
|
+
d = dict(src_dict)
|
|
59
|
+
subject_id = d.pop("subject_id")
|
|
60
|
+
|
|
61
|
+
settings = BehaviorCurriculumSettings.from_dict(d.pop("settings"))
|
|
62
|
+
|
|
63
|
+
behavior_curriculum_push_settings_request = cls(
|
|
64
|
+
subject_id=subject_id,
|
|
65
|
+
settings=settings,
|
|
66
|
+
)
|
|
67
|
+
|
|
68
|
+
behavior_curriculum_push_settings_request.additional_properties = d
|
|
69
|
+
return behavior_curriculum_push_settings_request
|
|
70
|
+
|
|
71
|
+
@property
|
|
72
|
+
def additional_keys(self) -> list[str]:
|
|
73
|
+
return list(self.additional_properties.keys())
|
|
74
|
+
|
|
75
|
+
def __getitem__(self, key: str) -> Any:
|
|
76
|
+
return self.additional_properties[key]
|
|
77
|
+
|
|
78
|
+
def __setitem__(self, key: str, value: Any) -> None:
|
|
79
|
+
self.additional_properties[key] = value
|
|
80
|
+
|
|
81
|
+
def __delitem__(self, key: str) -> None:
|
|
82
|
+
del self.additional_properties[key]
|
|
83
|
+
|
|
84
|
+
def __contains__(self, key: str) -> bool:
|
|
85
|
+
return key in self.additional_properties
|
|
@@ -0,0 +1,55 @@
|
|
|
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="BehaviorCurriculumSettings")
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
@_attrs_define
|
|
16
|
+
class BehaviorCurriculumSettings:
|
|
17
|
+
"""A curriculum/trainer-state document owned by the downstream training
|
|
18
|
+
software. Any JSON object; stored exactly as pushed. Docket reads only
|
|
19
|
+
`stage.task.name`, `curriculum.name`, `curriculum.version` and
|
|
20
|
+
`is_on_curriculum`.
|
|
21
|
+
|
|
22
|
+
"""
|
|
23
|
+
|
|
24
|
+
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
|
|
25
|
+
|
|
26
|
+
def to_dict(self) -> dict[str, Any]:
|
|
27
|
+
|
|
28
|
+
field_dict: dict[str, Any] = {}
|
|
29
|
+
field_dict.update(self.additional_properties)
|
|
30
|
+
|
|
31
|
+
return field_dict
|
|
32
|
+
|
|
33
|
+
@classmethod
|
|
34
|
+
def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
|
|
35
|
+
d = dict(src_dict)
|
|
36
|
+
behavior_curriculum_settings = cls()
|
|
37
|
+
|
|
38
|
+
behavior_curriculum_settings.additional_properties = d
|
|
39
|
+
return behavior_curriculum_settings
|
|
40
|
+
|
|
41
|
+
@property
|
|
42
|
+
def additional_keys(self) -> list[str]:
|
|
43
|
+
return list(self.additional_properties.keys())
|
|
44
|
+
|
|
45
|
+
def __getitem__(self, key: str) -> Any:
|
|
46
|
+
return self.additional_properties[key]
|
|
47
|
+
|
|
48
|
+
def __setitem__(self, key: str, value: Any) -> None:
|
|
49
|
+
self.additional_properties[key] = value
|
|
50
|
+
|
|
51
|
+
def __delitem__(self, key: str) -> None:
|
|
52
|
+
del self.additional_properties[key]
|
|
53
|
+
|
|
54
|
+
def __contains__(self, key: str) -> bool:
|
|
55
|
+
return key in self.additional_properties
|
|
@@ -0,0 +1,102 @@
|
|
|
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.behavior_curriculum_settings import BehaviorCurriculumSettings
|
|
15
|
+
from ..models.behavior_curriculum_settings_preview_response_promoted import (
|
|
16
|
+
BehaviorCurriculumSettingsPreviewResponsePromoted,
|
|
17
|
+
)
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
T = TypeVar("T", bound="BehaviorCurriculumSettingsPreviewResponse")
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
@_attrs_define
|
|
24
|
+
class BehaviorCurriculumSettingsPreviewResponse:
|
|
25
|
+
"""What a push of this payload would store, without storing it.
|
|
26
|
+
|
|
27
|
+
Attributes:
|
|
28
|
+
settings (BehaviorCurriculumSettings): A curriculum/trainer-state document owned by the downstream training
|
|
29
|
+
software. Any JSON object; stored exactly as pushed. Docket reads only
|
|
30
|
+
`stage.task.name`, `curriculum.name`, `curriculum.version` and
|
|
31
|
+
`is_on_curriculum`.
|
|
32
|
+
live_scope (str): Live scope the payload belongs to.
|
|
33
|
+
promoted (BehaviorCurriculumSettingsPreviewResponsePromoted): Promoted filter fields and their values.
|
|
34
|
+
"""
|
|
35
|
+
|
|
36
|
+
settings: BehaviorCurriculumSettings
|
|
37
|
+
live_scope: str
|
|
38
|
+
promoted: BehaviorCurriculumSettingsPreviewResponsePromoted
|
|
39
|
+
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
|
|
40
|
+
|
|
41
|
+
def to_dict(self) -> dict[str, Any]:
|
|
42
|
+
from ..models.behavior_curriculum_settings import BehaviorCurriculumSettings
|
|
43
|
+
from ..models.behavior_curriculum_settings_preview_response_promoted import (
|
|
44
|
+
BehaviorCurriculumSettingsPreviewResponsePromoted,
|
|
45
|
+
)
|
|
46
|
+
|
|
47
|
+
settings = self.settings.to_dict()
|
|
48
|
+
|
|
49
|
+
live_scope = self.live_scope
|
|
50
|
+
|
|
51
|
+
promoted = self.promoted.to_dict()
|
|
52
|
+
|
|
53
|
+
field_dict: dict[str, Any] = {}
|
|
54
|
+
field_dict.update(self.additional_properties)
|
|
55
|
+
field_dict.update(
|
|
56
|
+
{
|
|
57
|
+
"settings": settings,
|
|
58
|
+
"live_scope": live_scope,
|
|
59
|
+
"promoted": promoted,
|
|
60
|
+
}
|
|
61
|
+
)
|
|
62
|
+
|
|
63
|
+
return field_dict
|
|
64
|
+
|
|
65
|
+
@classmethod
|
|
66
|
+
def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
|
|
67
|
+
from ..models.behavior_curriculum_settings import BehaviorCurriculumSettings
|
|
68
|
+
from ..models.behavior_curriculum_settings_preview_response_promoted import (
|
|
69
|
+
BehaviorCurriculumSettingsPreviewResponsePromoted,
|
|
70
|
+
)
|
|
71
|
+
|
|
72
|
+
d = dict(src_dict)
|
|
73
|
+
settings = BehaviorCurriculumSettings.from_dict(d.pop("settings"))
|
|
74
|
+
|
|
75
|
+
live_scope = d.pop("live_scope")
|
|
76
|
+
|
|
77
|
+
promoted = BehaviorCurriculumSettingsPreviewResponsePromoted.from_dict(d.pop("promoted"))
|
|
78
|
+
|
|
79
|
+
behavior_curriculum_settings_preview_response = cls(
|
|
80
|
+
settings=settings,
|
|
81
|
+
live_scope=live_scope,
|
|
82
|
+
promoted=promoted,
|
|
83
|
+
)
|
|
84
|
+
|
|
85
|
+
behavior_curriculum_settings_preview_response.additional_properties = d
|
|
86
|
+
return behavior_curriculum_settings_preview_response
|
|
87
|
+
|
|
88
|
+
@property
|
|
89
|
+
def additional_keys(self) -> list[str]:
|
|
90
|
+
return list(self.additional_properties.keys())
|
|
91
|
+
|
|
92
|
+
def __getitem__(self, key: str) -> Any:
|
|
93
|
+
return self.additional_properties[key]
|
|
94
|
+
|
|
95
|
+
def __setitem__(self, key: str, value: Any) -> None:
|
|
96
|
+
self.additional_properties[key] = value
|
|
97
|
+
|
|
98
|
+
def __delitem__(self, key: str) -> None:
|
|
99
|
+
del self.additional_properties[key]
|
|
100
|
+
|
|
101
|
+
def __contains__(self, key: str) -> bool:
|
|
102
|
+
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="BehaviorCurriculumSettingsPreviewResponsePromoted")
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
@_attrs_define
|
|
16
|
+
class BehaviorCurriculumSettingsPreviewResponsePromoted:
|
|
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
|
+
behavior_curriculum_settings_preview_response_promoted = cls()
|
|
32
|
+
|
|
33
|
+
behavior_curriculum_settings_preview_response_promoted.additional_properties = d
|
|
34
|
+
return behavior_curriculum_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,160 @@
|
|
|
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.behavior_curriculum_settings import BehaviorCurriculumSettings
|
|
16
|
+
from ..models.behavior_curriculum_settings_version_response_promoted import (
|
|
17
|
+
BehaviorCurriculumSettingsVersionResponsePromoted,
|
|
18
|
+
)
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
T = TypeVar("T", bound="BehaviorCurriculumSettingsVersionResponse")
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
@_attrs_define
|
|
25
|
+
class BehaviorCurriculumSettingsVersionResponse:
|
|
26
|
+
"""One immutable settings version.
|
|
27
|
+
|
|
28
|
+
Attributes:
|
|
29
|
+
id (int): Version id; schedules pin it and run snapshots reference it.
|
|
30
|
+
subject_id (str): Canonical subject id.
|
|
31
|
+
live_scope (str): Scope within the subject; empty when the type has one live version per subject.
|
|
32
|
+
pushed_at (datetime.datetime): UTC instant, ISO 8601 with offset, e.g. 2026-10-15T16:00:00Z.
|
|
33
|
+
superseded_at (datetime.datetime | None):
|
|
34
|
+
pushed_by (str): Display name of the pusher; unverified while authentication is disabled.
|
|
35
|
+
settings (BehaviorCurriculumSettings): A curriculum/trainer-state document owned by the downstream training
|
|
36
|
+
software. Any JSON object; stored exactly as pushed. Docket reads only
|
|
37
|
+
`stage.task.name`, `curriculum.name`, `curriculum.version` and
|
|
38
|
+
`is_on_curriculum`.
|
|
39
|
+
promoted (BehaviorCurriculumSettingsVersionResponsePromoted): Promoted filter fields and their values.
|
|
40
|
+
"""
|
|
41
|
+
|
|
42
|
+
id: int
|
|
43
|
+
subject_id: str
|
|
44
|
+
live_scope: str
|
|
45
|
+
pushed_at: datetime.datetime
|
|
46
|
+
superseded_at: datetime.datetime | None
|
|
47
|
+
pushed_by: str
|
|
48
|
+
settings: BehaviorCurriculumSettings
|
|
49
|
+
promoted: BehaviorCurriculumSettingsVersionResponsePromoted
|
|
50
|
+
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
|
|
51
|
+
|
|
52
|
+
def to_dict(self) -> dict[str, Any]:
|
|
53
|
+
from ..models.behavior_curriculum_settings import BehaviorCurriculumSettings
|
|
54
|
+
from ..models.behavior_curriculum_settings_version_response_promoted import (
|
|
55
|
+
BehaviorCurriculumSettingsVersionResponsePromoted,
|
|
56
|
+
)
|
|
57
|
+
|
|
58
|
+
id = self.id
|
|
59
|
+
|
|
60
|
+
subject_id = self.subject_id
|
|
61
|
+
|
|
62
|
+
live_scope = self.live_scope
|
|
63
|
+
|
|
64
|
+
pushed_at = self.pushed_at.isoformat()
|
|
65
|
+
|
|
66
|
+
superseded_at: None | str
|
|
67
|
+
if isinstance(self.superseded_at, datetime.datetime):
|
|
68
|
+
superseded_at = self.superseded_at.isoformat()
|
|
69
|
+
else:
|
|
70
|
+
superseded_at = self.superseded_at
|
|
71
|
+
|
|
72
|
+
pushed_by = self.pushed_by
|
|
73
|
+
|
|
74
|
+
settings = self.settings.to_dict()
|
|
75
|
+
|
|
76
|
+
promoted = self.promoted.to_dict()
|
|
77
|
+
|
|
78
|
+
field_dict: dict[str, Any] = {}
|
|
79
|
+
field_dict.update(self.additional_properties)
|
|
80
|
+
field_dict.update(
|
|
81
|
+
{
|
|
82
|
+
"id": id,
|
|
83
|
+
"subject_id": subject_id,
|
|
84
|
+
"live_scope": live_scope,
|
|
85
|
+
"pushed_at": pushed_at,
|
|
86
|
+
"superseded_at": superseded_at,
|
|
87
|
+
"pushed_by": pushed_by,
|
|
88
|
+
"settings": settings,
|
|
89
|
+
"promoted": promoted,
|
|
90
|
+
}
|
|
91
|
+
)
|
|
92
|
+
|
|
93
|
+
return field_dict
|
|
94
|
+
|
|
95
|
+
@classmethod
|
|
96
|
+
def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
|
|
97
|
+
from ..models.behavior_curriculum_settings import BehaviorCurriculumSettings
|
|
98
|
+
from ..models.behavior_curriculum_settings_version_response_promoted import (
|
|
99
|
+
BehaviorCurriculumSettingsVersionResponsePromoted,
|
|
100
|
+
)
|
|
101
|
+
|
|
102
|
+
d = dict(src_dict)
|
|
103
|
+
id = d.pop("id")
|
|
104
|
+
|
|
105
|
+
subject_id = d.pop("subject_id")
|
|
106
|
+
|
|
107
|
+
live_scope = d.pop("live_scope")
|
|
108
|
+
|
|
109
|
+
pushed_at = datetime.datetime.fromisoformat(d.pop("pushed_at"))
|
|
110
|
+
|
|
111
|
+
def _parse_superseded_at(data: object) -> datetime.datetime | None:
|
|
112
|
+
if data is None:
|
|
113
|
+
return data
|
|
114
|
+
try:
|
|
115
|
+
if not isinstance(data, str):
|
|
116
|
+
raise TypeError()
|
|
117
|
+
componentsschemas_instant_nullable_type_1 = datetime.datetime.fromisoformat(data)
|
|
118
|
+
|
|
119
|
+
return componentsschemas_instant_nullable_type_1
|
|
120
|
+
except (TypeError, ValueError, AttributeError, KeyError):
|
|
121
|
+
pass
|
|
122
|
+
return cast(datetime.datetime | None, data)
|
|
123
|
+
|
|
124
|
+
superseded_at = _parse_superseded_at(d.pop("superseded_at"))
|
|
125
|
+
|
|
126
|
+
pushed_by = d.pop("pushed_by")
|
|
127
|
+
|
|
128
|
+
settings = BehaviorCurriculumSettings.from_dict(d.pop("settings"))
|
|
129
|
+
|
|
130
|
+
promoted = BehaviorCurriculumSettingsVersionResponsePromoted.from_dict(d.pop("promoted"))
|
|
131
|
+
|
|
132
|
+
behavior_curriculum_settings_version_response = cls(
|
|
133
|
+
id=id,
|
|
134
|
+
subject_id=subject_id,
|
|
135
|
+
live_scope=live_scope,
|
|
136
|
+
pushed_at=pushed_at,
|
|
137
|
+
superseded_at=superseded_at,
|
|
138
|
+
pushed_by=pushed_by,
|
|
139
|
+
settings=settings,
|
|
140
|
+
promoted=promoted,
|
|
141
|
+
)
|
|
142
|
+
|
|
143
|
+
behavior_curriculum_settings_version_response.additional_properties = d
|
|
144
|
+
return behavior_curriculum_settings_version_response
|
|
145
|
+
|
|
146
|
+
@property
|
|
147
|
+
def additional_keys(self) -> list[str]:
|
|
148
|
+
return list(self.additional_properties.keys())
|
|
149
|
+
|
|
150
|
+
def __getitem__(self, key: str) -> Any:
|
|
151
|
+
return self.additional_properties[key]
|
|
152
|
+
|
|
153
|
+
def __setitem__(self, key: str, value: Any) -> None:
|
|
154
|
+
self.additional_properties[key] = value
|
|
155
|
+
|
|
156
|
+
def __delitem__(self, key: str) -> None:
|
|
157
|
+
del self.additional_properties[key]
|
|
158
|
+
|
|
159
|
+
def __contains__(self, key: str) -> bool:
|
|
160
|
+
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="BehaviorCurriculumSettingsVersionResponsePromoted")
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
@_attrs_define
|
|
16
|
+
class BehaviorCurriculumSettingsVersionResponsePromoted:
|
|
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
|
+
behavior_curriculum_settings_version_response_promoted = cls()
|
|
32
|
+
|
|
33
|
+
behavior_curriculum_settings_version_response_promoted.additional_properties = d
|
|
34
|
+
return behavior_curriculum_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
|