phenostore-sdk-python 0.1.1__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.
- phenostore/__init__.py +26 -0
- phenostore/_auth.py +94 -0
- phenostore/client.py +276 -0
- phenostore/errors.py +93 -0
- phenostore/gen/__init__.py +8 -0
- phenostore/gen/api/__init__.py +1 -0
- phenostore/gen/api/bulk/__init__.py +1 -0
- phenostore/gen/api/bulk/get_bulk_status.py +194 -0
- phenostore/gen/api/bulk/submit_bulk.py +223 -0
- phenostore/gen/api/fhir/__init__.py +1 -0
- phenostore/gen/api/fhir/conditional_delete_resource.py +277 -0
- phenostore/gen/api/fhir/create_resource.py +257 -0
- phenostore/gen/api/fhir/delete_resource.py +212 -0
- phenostore/gen/api/fhir/get_docref.py +281 -0
- phenostore/gen/api/fhir/get_metadata.py +185 -0
- phenostore/gen/api/fhir/get_resource_history.py +240 -0
- phenostore/gen/api/fhir/get_smart_configuration.py +169 -0
- phenostore/gen/api/fhir/patch_resource.py +282 -0
- phenostore/gen/api/fhir/post_docref.py +200 -0
- phenostore/gen/api/fhir/process_bundle.py +201 -0
- phenostore/gen/api/fhir/read_resource.py +214 -0
- phenostore/gen/api/fhir/read_resource_version.py +228 -0
- phenostore/gen/api/fhir/search_resources.py +390 -0
- phenostore/gen/api/fhir/search_resources_post.py +228 -0
- phenostore/gen/api/fhir/update_resource.py +281 -0
- phenostore/gen/api/fhir/validate_resource.py +217 -0
- phenostore/gen/api/o_auth/__init__.py +1 -0
- phenostore/gen/api/o_auth/issue_token.py +186 -0
- phenostore/gen/api/system/__init__.py +1 -0
- phenostore/gen/api/system/get_health.py +128 -0
- phenostore/gen/client.py +280 -0
- phenostore/gen/errors.py +16 -0
- phenostore/gen/models/__init__.py +71 -0
- phenostore/gen/models/bulk_operation_accepted.py +79 -0
- phenostore/gen/models/bulk_operation_accepted_status.py +8 -0
- phenostore/gen/models/bulk_operation_status.py +122 -0
- phenostore/gen/models/bulk_operation_status_code.py +11 -0
- phenostore/gen/models/bundle.py +132 -0
- phenostore/gen/models/bundle_entry.py +128 -0
- phenostore/gen/models/bundle_entry_request.py +70 -0
- phenostore/gen/models/bundle_entry_response.py +97 -0
- phenostore/gen/models/bundle_entry_search.py +69 -0
- phenostore/gen/models/bundle_entry_search_mode.py +9 -0
- phenostore/gen/models/bundle_link.py +69 -0
- phenostore/gen/models/bundle_resource_type.py +8 -0
- phenostore/gen/models/bundle_type.py +11 -0
- phenostore/gen/models/fhir_resource.py +47 -0
- phenostore/gen/models/health_response.py +63 -0
- phenostore/gen/models/health_response_status.py +8 -0
- phenostore/gen/models/issue_severity.py +11 -0
- phenostore/gen/models/issue_token_body.py +91 -0
- phenostore/gen/models/issue_token_body_grant_type.py +8 -0
- phenostore/gen/models/json_patch_item.py +90 -0
- phenostore/gen/models/json_patch_op.py +13 -0
- phenostore/gen/models/o_auth_error.py +69 -0
- phenostore/gen/models/operation_outcome.py +85 -0
- phenostore/gen/models/operation_outcome_issue.py +92 -0
- phenostore/gen/models/operation_outcome_resource_type.py +8 -0
- phenostore/gen/models/post_docref_body.py +124 -0
- phenostore/gen/models/resource_type.py +47 -0
- phenostore/gen/models/search_resources_post_body.py +155 -0
- phenostore/gen/models/search_summary_mode.py +12 -0
- phenostore/gen/models/search_total_mode.py +10 -0
- phenostore/gen/models/smart_configuration.py +111 -0
- phenostore/gen/models/token_response.py +87 -0
- phenostore/gen/models/token_response_token_type.py +8 -0
- phenostore/gen/types.py +54 -0
- phenostore/py.typed +0 -0
- phenostore_sdk_python-0.1.1.dist-info/METADATA +196 -0
- phenostore_sdk_python-0.1.1.dist-info/RECORD +72 -0
- phenostore_sdk_python-0.1.1.dist-info/WHEEL +4 -0
- phenostore_sdk_python-0.1.1.dist-info/licenses/LICENSE +21 -0
|
@@ -0,0 +1,122 @@
|
|
|
1
|
+
from __future__ import annotations
|
|
2
|
+
|
|
3
|
+
import datetime
|
|
4
|
+
from collections.abc import Mapping
|
|
5
|
+
from typing import Any, TypeVar
|
|
6
|
+
|
|
7
|
+
from attrs import define as _attrs_define
|
|
8
|
+
from attrs import field as _attrs_field
|
|
9
|
+
|
|
10
|
+
from ..models.bulk_operation_status_code import BulkOperationStatusCode
|
|
11
|
+
from ..types import UNSET, Unset
|
|
12
|
+
|
|
13
|
+
T = TypeVar("T", bound="BulkOperationStatus")
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
@_attrs_define
|
|
17
|
+
class BulkOperationStatus:
|
|
18
|
+
"""
|
|
19
|
+
Attributes:
|
|
20
|
+
id (str):
|
|
21
|
+
status (BulkOperationStatusCode): Bulk operation lifecycle status
|
|
22
|
+
total_count (int):
|
|
23
|
+
processed_count (int):
|
|
24
|
+
error_count (int):
|
|
25
|
+
created_at (datetime.datetime):
|
|
26
|
+
updated_at (datetime.datetime):
|
|
27
|
+
result (Any | Unset): Result Bundle (present when status is completed).
|
|
28
|
+
"""
|
|
29
|
+
|
|
30
|
+
id: str
|
|
31
|
+
status: BulkOperationStatusCode
|
|
32
|
+
total_count: int
|
|
33
|
+
processed_count: int
|
|
34
|
+
error_count: int
|
|
35
|
+
created_at: datetime.datetime
|
|
36
|
+
updated_at: datetime.datetime
|
|
37
|
+
result: Any | Unset = UNSET
|
|
38
|
+
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
|
|
39
|
+
|
|
40
|
+
def to_dict(self) -> dict[str, Any]:
|
|
41
|
+
id = self.id
|
|
42
|
+
|
|
43
|
+
status = self.status.value
|
|
44
|
+
|
|
45
|
+
total_count = self.total_count
|
|
46
|
+
|
|
47
|
+
processed_count = self.processed_count
|
|
48
|
+
|
|
49
|
+
error_count = self.error_count
|
|
50
|
+
|
|
51
|
+
created_at = self.created_at.isoformat()
|
|
52
|
+
|
|
53
|
+
updated_at = self.updated_at.isoformat()
|
|
54
|
+
|
|
55
|
+
result = self.result
|
|
56
|
+
|
|
57
|
+
field_dict: dict[str, Any] = {}
|
|
58
|
+
field_dict.update(self.additional_properties)
|
|
59
|
+
field_dict.update(
|
|
60
|
+
{
|
|
61
|
+
"id": id,
|
|
62
|
+
"status": status,
|
|
63
|
+
"total_count": total_count,
|
|
64
|
+
"processed_count": processed_count,
|
|
65
|
+
"error_count": error_count,
|
|
66
|
+
"created_at": created_at,
|
|
67
|
+
"updated_at": updated_at,
|
|
68
|
+
}
|
|
69
|
+
)
|
|
70
|
+
if result is not UNSET:
|
|
71
|
+
field_dict["result"] = result
|
|
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
|
+
id = d.pop("id")
|
|
79
|
+
|
|
80
|
+
status = BulkOperationStatusCode(d.pop("status"))
|
|
81
|
+
|
|
82
|
+
total_count = d.pop("total_count")
|
|
83
|
+
|
|
84
|
+
processed_count = d.pop("processed_count")
|
|
85
|
+
|
|
86
|
+
error_count = d.pop("error_count")
|
|
87
|
+
|
|
88
|
+
created_at = datetime.datetime.fromisoformat(d.pop("created_at"))
|
|
89
|
+
|
|
90
|
+
updated_at = datetime.datetime.fromisoformat(d.pop("updated_at"))
|
|
91
|
+
|
|
92
|
+
result = d.pop("result", UNSET)
|
|
93
|
+
|
|
94
|
+
bulk_operation_status = cls(
|
|
95
|
+
id=id,
|
|
96
|
+
status=status,
|
|
97
|
+
total_count=total_count,
|
|
98
|
+
processed_count=processed_count,
|
|
99
|
+
error_count=error_count,
|
|
100
|
+
created_at=created_at,
|
|
101
|
+
updated_at=updated_at,
|
|
102
|
+
result=result,
|
|
103
|
+
)
|
|
104
|
+
|
|
105
|
+
bulk_operation_status.additional_properties = d
|
|
106
|
+
return bulk_operation_status
|
|
107
|
+
|
|
108
|
+
@property
|
|
109
|
+
def additional_keys(self) -> list[str]:
|
|
110
|
+
return list(self.additional_properties.keys())
|
|
111
|
+
|
|
112
|
+
def __getitem__(self, key: str) -> Any:
|
|
113
|
+
return self.additional_properties[key]
|
|
114
|
+
|
|
115
|
+
def __setitem__(self, key: str, value: Any) -> None:
|
|
116
|
+
self.additional_properties[key] = value
|
|
117
|
+
|
|
118
|
+
def __delitem__(self, key: str) -> None:
|
|
119
|
+
del self.additional_properties[key]
|
|
120
|
+
|
|
121
|
+
def __contains__(self, key: str) -> bool:
|
|
122
|
+
return key in self.additional_properties
|
|
@@ -0,0 +1,132 @@
|
|
|
1
|
+
from __future__ import annotations
|
|
2
|
+
|
|
3
|
+
from collections.abc import Mapping
|
|
4
|
+
from typing import TYPE_CHECKING, Any, TypeVar
|
|
5
|
+
|
|
6
|
+
from attrs import define as _attrs_define
|
|
7
|
+
from attrs import field as _attrs_field
|
|
8
|
+
|
|
9
|
+
from ..models.bundle_resource_type import BundleResourceType
|
|
10
|
+
from ..models.bundle_type import BundleType
|
|
11
|
+
from ..types import UNSET, Unset
|
|
12
|
+
|
|
13
|
+
if TYPE_CHECKING:
|
|
14
|
+
from ..models.bundle_entry import BundleEntry
|
|
15
|
+
from ..models.bundle_link import BundleLink
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
T = TypeVar("T", bound="Bundle")
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
@_attrs_define
|
|
22
|
+
class Bundle:
|
|
23
|
+
"""
|
|
24
|
+
Attributes:
|
|
25
|
+
resource_type (BundleResourceType):
|
|
26
|
+
type_ (BundleType): FHIR Bundle type
|
|
27
|
+
total (int | Unset):
|
|
28
|
+
link (list[BundleLink] | Unset):
|
|
29
|
+
entry (list[BundleEntry] | Unset):
|
|
30
|
+
"""
|
|
31
|
+
|
|
32
|
+
resource_type: BundleResourceType
|
|
33
|
+
type_: BundleType
|
|
34
|
+
total: int | Unset = UNSET
|
|
35
|
+
link: list[BundleLink] | Unset = UNSET
|
|
36
|
+
entry: list[BundleEntry] | Unset = UNSET
|
|
37
|
+
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
|
|
38
|
+
|
|
39
|
+
def to_dict(self) -> dict[str, Any]:
|
|
40
|
+
resource_type = self.resource_type.value
|
|
41
|
+
|
|
42
|
+
type_ = self.type_.value
|
|
43
|
+
|
|
44
|
+
total = self.total
|
|
45
|
+
|
|
46
|
+
link: list[dict[str, Any]] | Unset = UNSET
|
|
47
|
+
if not isinstance(self.link, Unset):
|
|
48
|
+
link = []
|
|
49
|
+
for link_item_data in self.link:
|
|
50
|
+
link_item = link_item_data.to_dict()
|
|
51
|
+
link.append(link_item)
|
|
52
|
+
|
|
53
|
+
entry: list[dict[str, Any]] | Unset = UNSET
|
|
54
|
+
if not isinstance(self.entry, Unset):
|
|
55
|
+
entry = []
|
|
56
|
+
for entry_item_data in self.entry:
|
|
57
|
+
entry_item = entry_item_data.to_dict()
|
|
58
|
+
entry.append(entry_item)
|
|
59
|
+
|
|
60
|
+
field_dict: dict[str, Any] = {}
|
|
61
|
+
field_dict.update(self.additional_properties)
|
|
62
|
+
field_dict.update(
|
|
63
|
+
{
|
|
64
|
+
"resourceType": resource_type,
|
|
65
|
+
"type": type_,
|
|
66
|
+
}
|
|
67
|
+
)
|
|
68
|
+
if total is not UNSET:
|
|
69
|
+
field_dict["total"] = total
|
|
70
|
+
if link is not UNSET:
|
|
71
|
+
field_dict["link"] = link
|
|
72
|
+
if entry is not UNSET:
|
|
73
|
+
field_dict["entry"] = entry
|
|
74
|
+
|
|
75
|
+
return field_dict
|
|
76
|
+
|
|
77
|
+
@classmethod
|
|
78
|
+
def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
|
|
79
|
+
from ..models.bundle_entry import BundleEntry # noqa: PLC0415
|
|
80
|
+
from ..models.bundle_link import BundleLink # noqa: PLC0415
|
|
81
|
+
|
|
82
|
+
d = dict(src_dict)
|
|
83
|
+
resource_type = BundleResourceType(d.pop("resourceType"))
|
|
84
|
+
|
|
85
|
+
type_ = BundleType(d.pop("type"))
|
|
86
|
+
|
|
87
|
+
total = d.pop("total", UNSET)
|
|
88
|
+
|
|
89
|
+
_link = d.pop("link", UNSET)
|
|
90
|
+
link: list[BundleLink] | Unset = UNSET
|
|
91
|
+
if _link is not UNSET:
|
|
92
|
+
link = []
|
|
93
|
+
for link_item_data in _link:
|
|
94
|
+
link_item = BundleLink.from_dict(link_item_data)
|
|
95
|
+
|
|
96
|
+
link.append(link_item)
|
|
97
|
+
|
|
98
|
+
_entry = d.pop("entry", UNSET)
|
|
99
|
+
entry: list[BundleEntry] | Unset = UNSET
|
|
100
|
+
if _entry is not UNSET:
|
|
101
|
+
entry = []
|
|
102
|
+
for entry_item_data in _entry:
|
|
103
|
+
entry_item = BundleEntry.from_dict(entry_item_data)
|
|
104
|
+
|
|
105
|
+
entry.append(entry_item)
|
|
106
|
+
|
|
107
|
+
bundle = cls(
|
|
108
|
+
resource_type=resource_type,
|
|
109
|
+
type_=type_,
|
|
110
|
+
total=total,
|
|
111
|
+
link=link,
|
|
112
|
+
entry=entry,
|
|
113
|
+
)
|
|
114
|
+
|
|
115
|
+
bundle.additional_properties = d
|
|
116
|
+
return bundle
|
|
117
|
+
|
|
118
|
+
@property
|
|
119
|
+
def additional_keys(self) -> list[str]:
|
|
120
|
+
return list(self.additional_properties.keys())
|
|
121
|
+
|
|
122
|
+
def __getitem__(self, key: str) -> Any:
|
|
123
|
+
return self.additional_properties[key]
|
|
124
|
+
|
|
125
|
+
def __setitem__(self, key: str, value: Any) -> None:
|
|
126
|
+
self.additional_properties[key] = value
|
|
127
|
+
|
|
128
|
+
def __delitem__(self, key: str) -> None:
|
|
129
|
+
del self.additional_properties[key]
|
|
130
|
+
|
|
131
|
+
def __contains__(self, key: str) -> bool:
|
|
132
|
+
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 TYPE_CHECKING, Any, TypeVar
|
|
5
|
+
|
|
6
|
+
from attrs import define as _attrs_define
|
|
7
|
+
from attrs import field as _attrs_field
|
|
8
|
+
|
|
9
|
+
from ..types import UNSET, Unset
|
|
10
|
+
|
|
11
|
+
if TYPE_CHECKING:
|
|
12
|
+
from ..models.bundle_entry_request import BundleEntryRequest
|
|
13
|
+
from ..models.bundle_entry_response import BundleEntryResponse
|
|
14
|
+
from ..models.bundle_entry_search import BundleEntrySearch
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
T = TypeVar("T", bound="BundleEntry")
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
@_attrs_define
|
|
21
|
+
class BundleEntry:
|
|
22
|
+
"""
|
|
23
|
+
Attributes:
|
|
24
|
+
full_url (str | Unset):
|
|
25
|
+
resource (Any | Unset): The resource content (arbitrary FHIR resource JSON).
|
|
26
|
+
search (BundleEntrySearch | Unset):
|
|
27
|
+
request (BundleEntryRequest | Unset):
|
|
28
|
+
response (BundleEntryResponse | Unset):
|
|
29
|
+
"""
|
|
30
|
+
|
|
31
|
+
full_url: str | Unset = UNSET
|
|
32
|
+
resource: Any | Unset = UNSET
|
|
33
|
+
search: BundleEntrySearch | Unset = UNSET
|
|
34
|
+
request: BundleEntryRequest | Unset = UNSET
|
|
35
|
+
response: BundleEntryResponse | Unset = UNSET
|
|
36
|
+
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
|
|
37
|
+
|
|
38
|
+
def to_dict(self) -> dict[str, Any]:
|
|
39
|
+
full_url = self.full_url
|
|
40
|
+
|
|
41
|
+
resource = self.resource
|
|
42
|
+
|
|
43
|
+
search: dict[str, Any] | Unset = UNSET
|
|
44
|
+
if not isinstance(self.search, Unset):
|
|
45
|
+
search = self.search.to_dict()
|
|
46
|
+
|
|
47
|
+
request: dict[str, Any] | Unset = UNSET
|
|
48
|
+
if not isinstance(self.request, Unset):
|
|
49
|
+
request = self.request.to_dict()
|
|
50
|
+
|
|
51
|
+
response: dict[str, Any] | Unset = UNSET
|
|
52
|
+
if not isinstance(self.response, Unset):
|
|
53
|
+
response = self.response.to_dict()
|
|
54
|
+
|
|
55
|
+
field_dict: dict[str, Any] = {}
|
|
56
|
+
field_dict.update(self.additional_properties)
|
|
57
|
+
field_dict.update({})
|
|
58
|
+
if full_url is not UNSET:
|
|
59
|
+
field_dict["fullUrl"] = full_url
|
|
60
|
+
if resource is not UNSET:
|
|
61
|
+
field_dict["resource"] = resource
|
|
62
|
+
if search is not UNSET:
|
|
63
|
+
field_dict["search"] = search
|
|
64
|
+
if request is not UNSET:
|
|
65
|
+
field_dict["request"] = request
|
|
66
|
+
if response is not UNSET:
|
|
67
|
+
field_dict["response"] = response
|
|
68
|
+
|
|
69
|
+
return field_dict
|
|
70
|
+
|
|
71
|
+
@classmethod
|
|
72
|
+
def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
|
|
73
|
+
from ..models.bundle_entry_request import BundleEntryRequest # noqa: PLC0415
|
|
74
|
+
from ..models.bundle_entry_response import BundleEntryResponse # noqa: PLC0415
|
|
75
|
+
from ..models.bundle_entry_search import BundleEntrySearch # noqa: PLC0415
|
|
76
|
+
|
|
77
|
+
d = dict(src_dict)
|
|
78
|
+
full_url = d.pop("fullUrl", UNSET)
|
|
79
|
+
|
|
80
|
+
resource = d.pop("resource", UNSET)
|
|
81
|
+
|
|
82
|
+
_search = d.pop("search", UNSET)
|
|
83
|
+
search: BundleEntrySearch | Unset
|
|
84
|
+
if isinstance(_search, Unset):
|
|
85
|
+
search = UNSET
|
|
86
|
+
else:
|
|
87
|
+
search = BundleEntrySearch.from_dict(_search)
|
|
88
|
+
|
|
89
|
+
_request = d.pop("request", UNSET)
|
|
90
|
+
request: BundleEntryRequest | Unset
|
|
91
|
+
if isinstance(_request, Unset):
|
|
92
|
+
request = UNSET
|
|
93
|
+
else:
|
|
94
|
+
request = BundleEntryRequest.from_dict(_request)
|
|
95
|
+
|
|
96
|
+
_response = d.pop("response", UNSET)
|
|
97
|
+
response: BundleEntryResponse | Unset
|
|
98
|
+
if isinstance(_response, Unset):
|
|
99
|
+
response = UNSET
|
|
100
|
+
else:
|
|
101
|
+
response = BundleEntryResponse.from_dict(_response)
|
|
102
|
+
|
|
103
|
+
bundle_entry = cls(
|
|
104
|
+
full_url=full_url,
|
|
105
|
+
resource=resource,
|
|
106
|
+
search=search,
|
|
107
|
+
request=request,
|
|
108
|
+
response=response,
|
|
109
|
+
)
|
|
110
|
+
|
|
111
|
+
bundle_entry.additional_properties = d
|
|
112
|
+
return bundle_entry
|
|
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,70 @@
|
|
|
1
|
+
from __future__ import annotations
|
|
2
|
+
|
|
3
|
+
from collections.abc import Mapping
|
|
4
|
+
from typing import Any, TypeVar
|
|
5
|
+
|
|
6
|
+
from attrs import define as _attrs_define
|
|
7
|
+
from attrs import field as _attrs_field
|
|
8
|
+
|
|
9
|
+
from ..types import UNSET, Unset
|
|
10
|
+
|
|
11
|
+
T = TypeVar("T", bound="BundleEntryRequest")
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
@_attrs_define
|
|
15
|
+
class BundleEntryRequest:
|
|
16
|
+
"""
|
|
17
|
+
Attributes:
|
|
18
|
+
method (str | Unset):
|
|
19
|
+
url (str | Unset):
|
|
20
|
+
"""
|
|
21
|
+
|
|
22
|
+
method: str | Unset = UNSET
|
|
23
|
+
url: str | Unset = UNSET
|
|
24
|
+
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
|
|
25
|
+
|
|
26
|
+
def to_dict(self) -> dict[str, Any]:
|
|
27
|
+
method = self.method
|
|
28
|
+
|
|
29
|
+
url = self.url
|
|
30
|
+
|
|
31
|
+
field_dict: dict[str, Any] = {}
|
|
32
|
+
field_dict.update(self.additional_properties)
|
|
33
|
+
field_dict.update({})
|
|
34
|
+
if method is not UNSET:
|
|
35
|
+
field_dict["method"] = method
|
|
36
|
+
if url is not UNSET:
|
|
37
|
+
field_dict["url"] = url
|
|
38
|
+
|
|
39
|
+
return field_dict
|
|
40
|
+
|
|
41
|
+
@classmethod
|
|
42
|
+
def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
|
|
43
|
+
d = dict(src_dict)
|
|
44
|
+
method = d.pop("method", UNSET)
|
|
45
|
+
|
|
46
|
+
url = d.pop("url", UNSET)
|
|
47
|
+
|
|
48
|
+
bundle_entry_request = cls(
|
|
49
|
+
method=method,
|
|
50
|
+
url=url,
|
|
51
|
+
)
|
|
52
|
+
|
|
53
|
+
bundle_entry_request.additional_properties = d
|
|
54
|
+
return bundle_entry_request
|
|
55
|
+
|
|
56
|
+
@property
|
|
57
|
+
def additional_keys(self) -> list[str]:
|
|
58
|
+
return list(self.additional_properties.keys())
|
|
59
|
+
|
|
60
|
+
def __getitem__(self, key: str) -> Any:
|
|
61
|
+
return self.additional_properties[key]
|
|
62
|
+
|
|
63
|
+
def __setitem__(self, key: str, value: Any) -> None:
|
|
64
|
+
self.additional_properties[key] = value
|
|
65
|
+
|
|
66
|
+
def __delitem__(self, key: str) -> None:
|
|
67
|
+
del self.additional_properties[key]
|
|
68
|
+
|
|
69
|
+
def __contains__(self, key: str) -> bool:
|
|
70
|
+
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
|
|
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
|
+
T = TypeVar("T", bound="BundleEntryResponse")
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
@_attrs_define
|
|
15
|
+
class BundleEntryResponse:
|
|
16
|
+
"""
|
|
17
|
+
Attributes:
|
|
18
|
+
status (str | Unset):
|
|
19
|
+
location (str | Unset):
|
|
20
|
+
etag (str | Unset):
|
|
21
|
+
last_modified (str | Unset):
|
|
22
|
+
outcome (Any | Unset): OperationOutcome for this entry (arbitrary JSON).
|
|
23
|
+
"""
|
|
24
|
+
|
|
25
|
+
status: str | Unset = UNSET
|
|
26
|
+
location: str | Unset = UNSET
|
|
27
|
+
etag: str | Unset = UNSET
|
|
28
|
+
last_modified: str | Unset = UNSET
|
|
29
|
+
outcome: Any | Unset = UNSET
|
|
30
|
+
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
|
|
31
|
+
|
|
32
|
+
def to_dict(self) -> dict[str, Any]:
|
|
33
|
+
status = self.status
|
|
34
|
+
|
|
35
|
+
location = self.location
|
|
36
|
+
|
|
37
|
+
etag = self.etag
|
|
38
|
+
|
|
39
|
+
last_modified = self.last_modified
|
|
40
|
+
|
|
41
|
+
outcome = self.outcome
|
|
42
|
+
|
|
43
|
+
field_dict: dict[str, Any] = {}
|
|
44
|
+
field_dict.update(self.additional_properties)
|
|
45
|
+
field_dict.update({})
|
|
46
|
+
if status is not UNSET:
|
|
47
|
+
field_dict["status"] = status
|
|
48
|
+
if location is not UNSET:
|
|
49
|
+
field_dict["location"] = location
|
|
50
|
+
if etag is not UNSET:
|
|
51
|
+
field_dict["etag"] = etag
|
|
52
|
+
if last_modified is not UNSET:
|
|
53
|
+
field_dict["lastModified"] = last_modified
|
|
54
|
+
if outcome is not UNSET:
|
|
55
|
+
field_dict["outcome"] = outcome
|
|
56
|
+
|
|
57
|
+
return field_dict
|
|
58
|
+
|
|
59
|
+
@classmethod
|
|
60
|
+
def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
|
|
61
|
+
d = dict(src_dict)
|
|
62
|
+
status = d.pop("status", UNSET)
|
|
63
|
+
|
|
64
|
+
location = d.pop("location", UNSET)
|
|
65
|
+
|
|
66
|
+
etag = d.pop("etag", UNSET)
|
|
67
|
+
|
|
68
|
+
last_modified = d.pop("lastModified", UNSET)
|
|
69
|
+
|
|
70
|
+
outcome = d.pop("outcome", UNSET)
|
|
71
|
+
|
|
72
|
+
bundle_entry_response = cls(
|
|
73
|
+
status=status,
|
|
74
|
+
location=location,
|
|
75
|
+
etag=etag,
|
|
76
|
+
last_modified=last_modified,
|
|
77
|
+
outcome=outcome,
|
|
78
|
+
)
|
|
79
|
+
|
|
80
|
+
bundle_entry_response.additional_properties = d
|
|
81
|
+
return bundle_entry_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,69 @@
|
|
|
1
|
+
from __future__ import annotations
|
|
2
|
+
|
|
3
|
+
from collections.abc import Mapping
|
|
4
|
+
from typing import Any, TypeVar
|
|
5
|
+
|
|
6
|
+
from attrs import define as _attrs_define
|
|
7
|
+
from attrs import field as _attrs_field
|
|
8
|
+
|
|
9
|
+
from ..models.bundle_entry_search_mode import BundleEntrySearchMode
|
|
10
|
+
from ..types import UNSET, Unset
|
|
11
|
+
|
|
12
|
+
T = TypeVar("T", bound="BundleEntrySearch")
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
@_attrs_define
|
|
16
|
+
class BundleEntrySearch:
|
|
17
|
+
"""
|
|
18
|
+
Attributes:
|
|
19
|
+
mode (BundleEntrySearchMode | Unset):
|
|
20
|
+
"""
|
|
21
|
+
|
|
22
|
+
mode: BundleEntrySearchMode | Unset = UNSET
|
|
23
|
+
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
|
|
24
|
+
|
|
25
|
+
def to_dict(self) -> dict[str, Any]:
|
|
26
|
+
mode: str | Unset = UNSET
|
|
27
|
+
if not isinstance(self.mode, Unset):
|
|
28
|
+
mode = self.mode.value
|
|
29
|
+
|
|
30
|
+
field_dict: dict[str, Any] = {}
|
|
31
|
+
field_dict.update(self.additional_properties)
|
|
32
|
+
field_dict.update({})
|
|
33
|
+
if mode is not UNSET:
|
|
34
|
+
field_dict["mode"] = mode
|
|
35
|
+
|
|
36
|
+
return field_dict
|
|
37
|
+
|
|
38
|
+
@classmethod
|
|
39
|
+
def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
|
|
40
|
+
d = dict(src_dict)
|
|
41
|
+
_mode = d.pop("mode", UNSET)
|
|
42
|
+
mode: BundleEntrySearchMode | Unset
|
|
43
|
+
if isinstance(_mode, Unset):
|
|
44
|
+
mode = UNSET
|
|
45
|
+
else:
|
|
46
|
+
mode = BundleEntrySearchMode(_mode)
|
|
47
|
+
|
|
48
|
+
bundle_entry_search = cls(
|
|
49
|
+
mode=mode,
|
|
50
|
+
)
|
|
51
|
+
|
|
52
|
+
bundle_entry_search.additional_properties = d
|
|
53
|
+
return bundle_entry_search
|
|
54
|
+
|
|
55
|
+
@property
|
|
56
|
+
def additional_keys(self) -> list[str]:
|
|
57
|
+
return list(self.additional_properties.keys())
|
|
58
|
+
|
|
59
|
+
def __getitem__(self, key: str) -> Any:
|
|
60
|
+
return self.additional_properties[key]
|
|
61
|
+
|
|
62
|
+
def __setitem__(self, key: str, value: Any) -> None:
|
|
63
|
+
self.additional_properties[key] = value
|
|
64
|
+
|
|
65
|
+
def __delitem__(self, key: str) -> None:
|
|
66
|
+
del self.additional_properties[key]
|
|
67
|
+
|
|
68
|
+
def __contains__(self, key: str) -> bool:
|
|
69
|
+
return key in self.additional_properties
|