Unified-python-sdk 0.61.2__py3-none-any.whl → 0.61.3__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.
- unified_python_sdk/_version.py +2 -2
- unified_python_sdk/careplan.py +391 -0
- unified_python_sdk/coverage.py +391 -0
- unified_python_sdk/document.py +586 -0
- unified_python_sdk/goal.py +376 -0
- unified_python_sdk/healthcare.py +3036 -558
- unified_python_sdk/models/operations/__init__.py +221 -0
- unified_python_sdk/models/operations/createhealthcareappointment.py +2 -0
- unified_python_sdk/models/operations/createhealthcaredocument.py +131 -0
- unified_python_sdk/models/operations/createhealthcarepatient.py +4 -0
- unified_python_sdk/models/operations/gethealthcareappointment.py +2 -0
- unified_python_sdk/models/operations/gethealthcarecareplan.py +131 -0
- unified_python_sdk/models/operations/gethealthcarecoverage.py +133 -0
- unified_python_sdk/models/operations/gethealthcaredocument.py +131 -0
- unified_python_sdk/models/operations/gethealthcaregoal.py +125 -0
- unified_python_sdk/models/operations/gethealthcaremedication.py +3 -0
- unified_python_sdk/models/operations/gethealthcarepatient.py +4 -0
- unified_python_sdk/models/operations/gethealthcareprocedure.py +134 -0
- unified_python_sdk/models/operations/gethealthcarereport.py +126 -0
- unified_python_sdk/models/operations/listhealthcareappointments.py +2 -0
- unified_python_sdk/models/operations/listhealthcarecareplans.py +186 -0
- unified_python_sdk/models/operations/listhealthcarecoverages.py +188 -0
- unified_python_sdk/models/operations/listhealthcaredocuments.py +193 -0
- unified_python_sdk/models/operations/listhealthcaregoals.py +178 -0
- unified_python_sdk/models/operations/listhealthcaremedications.py +3 -0
- unified_python_sdk/models/operations/listhealthcarepatients.py +4 -0
- unified_python_sdk/models/operations/listhealthcareprocedures.py +187 -0
- unified_python_sdk/models/operations/listhealthcarereports.py +188 -0
- unified_python_sdk/models/operations/patchhealthcareappointment.py +2 -0
- unified_python_sdk/models/operations/patchhealthcarepatient.py +4 -0
- unified_python_sdk/models/operations/updatehealthcareappointment.py +2 -0
- unified_python_sdk/models/operations/updatehealthcarepatient.py +4 -0
- unified_python_sdk/models/shared/__init__.py +99 -2
- unified_python_sdk/models/shared/healthcareappointment.py +12 -0
- unified_python_sdk/models/shared/healthcarecareplan.py +161 -0
- unified_python_sdk/models/shared/healthcarecoverage.py +189 -0
- unified_python_sdk/models/shared/healthcaredocument.py +182 -0
- unified_python_sdk/models/shared/healthcaregoal.py +175 -0
- unified_python_sdk/models/shared/healthcaremedication.py +18 -0
- unified_python_sdk/models/shared/healthcarepatient.py +52 -0
- unified_python_sdk/models/shared/healthcarepatientcontact.py +61 -0
- unified_python_sdk/models/shared/healthcareprocedure.py +168 -0
- unified_python_sdk/models/shared/healthcarereport.py +177 -0
- unified_python_sdk/models/shared/hrisemployee.py +4 -4
- unified_python_sdk/models/shared/property_connection_permissions.py +12 -0
- unified_python_sdk/models/shared/property_healthcarepatientcontact_address.py +64 -0
- unified_python_sdk/models/shared/webhook.py +6 -0
- unified_python_sdk/procedure.py +391 -0
- unified_python_sdk/report.py +376 -0
- unified_python_sdk/sdk.py +11 -2
- {unified_python_sdk-0.61.2.dist-info → unified_python_sdk-0.61.3.dist-info}/METADATA +52 -17
- {unified_python_sdk-0.61.2.dist-info → unified_python_sdk-0.61.3.dist-info}/RECORD +54 -30
- {unified_python_sdk-0.61.2.dist-info → unified_python_sdk-0.61.3.dist-info}/WHEEL +0 -0
- {unified_python_sdk-0.61.2.dist-info → unified_python_sdk-0.61.3.dist-info}/licenses/LICENSE.md +0 -0
unified_python_sdk/_version.py
CHANGED
|
@@ -3,10 +3,10 @@
|
|
|
3
3
|
import importlib.metadata
|
|
4
4
|
|
|
5
5
|
__title__: str = "Unified-python-sdk"
|
|
6
|
-
__version__: str = "0.61.
|
|
6
|
+
__version__: str = "0.61.3"
|
|
7
7
|
__openapi_doc_version__: str = "1.0"
|
|
8
8
|
__gen_version__: str = "2.950.13"
|
|
9
|
-
__user_agent__: str = "speakeasy-sdk/python 0.61.
|
|
9
|
+
__user_agent__: str = "speakeasy-sdk/python 0.61.3 2.950.13 1.0 Unified-python-sdk"
|
|
10
10
|
|
|
11
11
|
try:
|
|
12
12
|
if __package__ is not None:
|
|
@@ -0,0 +1,391 @@
|
|
|
1
|
+
"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
|
|
2
|
+
|
|
3
|
+
from .basesdk import BaseSDK
|
|
4
|
+
from typing import List, Mapping, Optional, Union, cast
|
|
5
|
+
from unified_python_sdk import utils
|
|
6
|
+
from unified_python_sdk._hooks import HookContext
|
|
7
|
+
from unified_python_sdk.models import errors, operations, shared
|
|
8
|
+
from unified_python_sdk.types import BaseModel, OptionalNullable, UNSET
|
|
9
|
+
from unified_python_sdk.utils.unmarshal_json_response import unmarshal_json_response
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
class Careplan(BaseSDK):
|
|
13
|
+
def get_healthcare_careplan(
|
|
14
|
+
self,
|
|
15
|
+
*,
|
|
16
|
+
request: Union[
|
|
17
|
+
operations.GetHealthcareCareplanRequest,
|
|
18
|
+
operations.GetHealthcareCareplanRequestTypedDict,
|
|
19
|
+
],
|
|
20
|
+
retries: OptionalNullable[utils.RetryConfig] = UNSET,
|
|
21
|
+
server_url: Optional[str] = None,
|
|
22
|
+
timeout_ms: Optional[int] = None,
|
|
23
|
+
http_headers: Optional[Mapping[str, str]] = None,
|
|
24
|
+
) -> operations.GetHealthcareCareplanResponse:
|
|
25
|
+
r"""Retrieve a careplan
|
|
26
|
+
|
|
27
|
+
Retrieves a single HealthcareCareplan by its `id`. Obtain `id` values from the corresponding list endpoint. Use `fields` to return only the fields you need.
|
|
28
|
+
|
|
29
|
+
:param request: The request object to send.
|
|
30
|
+
:param retries: Override the default retry configuration for this method
|
|
31
|
+
:param server_url: Override the default server URL for this method
|
|
32
|
+
:param timeout_ms: Override the default request timeout configuration for this method in milliseconds
|
|
33
|
+
:param http_headers: Additional headers to set or replace on requests.
|
|
34
|
+
"""
|
|
35
|
+
base_url = None
|
|
36
|
+
url_variables = None
|
|
37
|
+
if timeout_ms is None:
|
|
38
|
+
timeout_ms = self.sdk_configuration.timeout_ms
|
|
39
|
+
|
|
40
|
+
if server_url is not None:
|
|
41
|
+
base_url = server_url
|
|
42
|
+
else:
|
|
43
|
+
base_url = self._get_url(base_url, url_variables)
|
|
44
|
+
|
|
45
|
+
if not isinstance(request, BaseModel):
|
|
46
|
+
request = utils.unmarshal(request, operations.GetHealthcareCareplanRequest)
|
|
47
|
+
request = cast(operations.GetHealthcareCareplanRequest, request)
|
|
48
|
+
|
|
49
|
+
req = self._build_request(
|
|
50
|
+
method="GET",
|
|
51
|
+
path="/healthcare/{connection_id}/careplan/{id}",
|
|
52
|
+
base_url=base_url,
|
|
53
|
+
url_variables=url_variables,
|
|
54
|
+
request=request,
|
|
55
|
+
request_body_required=False,
|
|
56
|
+
request_has_path_params=True,
|
|
57
|
+
request_has_query_params=True,
|
|
58
|
+
user_agent_header="user-agent",
|
|
59
|
+
accept_header_value="application/json",
|
|
60
|
+
http_headers=http_headers,
|
|
61
|
+
security=self.sdk_configuration.security,
|
|
62
|
+
allow_empty_value=None,
|
|
63
|
+
timeout_ms=timeout_ms,
|
|
64
|
+
)
|
|
65
|
+
|
|
66
|
+
if retries == UNSET:
|
|
67
|
+
if self.sdk_configuration.retry_config is not UNSET:
|
|
68
|
+
retries = self.sdk_configuration.retry_config
|
|
69
|
+
|
|
70
|
+
retry_config = None
|
|
71
|
+
if isinstance(retries, utils.RetryConfig):
|
|
72
|
+
retry_config = (retries, ["429", "500", "502", "503", "504"])
|
|
73
|
+
|
|
74
|
+
http_res = self.do_request(
|
|
75
|
+
hook_ctx=HookContext(
|
|
76
|
+
config=self.sdk_configuration,
|
|
77
|
+
base_url=base_url or "",
|
|
78
|
+
operation_id="getHealthcareCareplan",
|
|
79
|
+
oauth2_scopes=None,
|
|
80
|
+
security_source=self.sdk_configuration.security,
|
|
81
|
+
tags=["healthcare", "careplan"],
|
|
82
|
+
extensions=None,
|
|
83
|
+
),
|
|
84
|
+
request=req,
|
|
85
|
+
is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c),
|
|
86
|
+
retry_config=retry_config,
|
|
87
|
+
)
|
|
88
|
+
|
|
89
|
+
if utils.match_response(http_res, "200", "application/json"):
|
|
90
|
+
return operations.GetHealthcareCareplanResponse(
|
|
91
|
+
healthcare_careplan=unmarshal_json_response(
|
|
92
|
+
Optional[shared.HealthcareCareplan], http_res
|
|
93
|
+
),
|
|
94
|
+
status_code=http_res.status_code,
|
|
95
|
+
content_type=http_res.headers.get("Content-Type") or "",
|
|
96
|
+
raw_response=http_res,
|
|
97
|
+
)
|
|
98
|
+
if utils.match_response(http_res, "4XX", "*"):
|
|
99
|
+
http_res_text = utils.stream_to_text(http_res)
|
|
100
|
+
raise errors.SDKError("API error occurred", http_res, http_res_text)
|
|
101
|
+
if utils.match_response(http_res, "5XX", "*"):
|
|
102
|
+
http_res_text = utils.stream_to_text(http_res)
|
|
103
|
+
raise errors.SDKError("API error occurred", http_res, http_res_text)
|
|
104
|
+
|
|
105
|
+
raise errors.SDKError("Unexpected response received", http_res)
|
|
106
|
+
|
|
107
|
+
async def get_healthcare_careplan_async(
|
|
108
|
+
self,
|
|
109
|
+
*,
|
|
110
|
+
request: Union[
|
|
111
|
+
operations.GetHealthcareCareplanRequest,
|
|
112
|
+
operations.GetHealthcareCareplanRequestTypedDict,
|
|
113
|
+
],
|
|
114
|
+
retries: OptionalNullable[utils.RetryConfig] = UNSET,
|
|
115
|
+
server_url: Optional[str] = None,
|
|
116
|
+
timeout_ms: Optional[int] = None,
|
|
117
|
+
http_headers: Optional[Mapping[str, str]] = None,
|
|
118
|
+
) -> operations.GetHealthcareCareplanResponse:
|
|
119
|
+
r"""Retrieve a careplan
|
|
120
|
+
|
|
121
|
+
Retrieves a single HealthcareCareplan by its `id`. Obtain `id` values from the corresponding list endpoint. Use `fields` to return only the fields you need.
|
|
122
|
+
|
|
123
|
+
:param request: The request object to send.
|
|
124
|
+
:param retries: Override the default retry configuration for this method
|
|
125
|
+
:param server_url: Override the default server URL for this method
|
|
126
|
+
:param timeout_ms: Override the default request timeout configuration for this method in milliseconds
|
|
127
|
+
:param http_headers: Additional headers to set or replace on requests.
|
|
128
|
+
"""
|
|
129
|
+
base_url = None
|
|
130
|
+
url_variables = None
|
|
131
|
+
if timeout_ms is None:
|
|
132
|
+
timeout_ms = self.sdk_configuration.timeout_ms
|
|
133
|
+
|
|
134
|
+
if server_url is not None:
|
|
135
|
+
base_url = server_url
|
|
136
|
+
else:
|
|
137
|
+
base_url = self._get_url(base_url, url_variables)
|
|
138
|
+
|
|
139
|
+
if not isinstance(request, BaseModel):
|
|
140
|
+
request = utils.unmarshal(request, operations.GetHealthcareCareplanRequest)
|
|
141
|
+
request = cast(operations.GetHealthcareCareplanRequest, request)
|
|
142
|
+
|
|
143
|
+
req = self._build_request_async(
|
|
144
|
+
method="GET",
|
|
145
|
+
path="/healthcare/{connection_id}/careplan/{id}",
|
|
146
|
+
base_url=base_url,
|
|
147
|
+
url_variables=url_variables,
|
|
148
|
+
request=request,
|
|
149
|
+
request_body_required=False,
|
|
150
|
+
request_has_path_params=True,
|
|
151
|
+
request_has_query_params=True,
|
|
152
|
+
user_agent_header="user-agent",
|
|
153
|
+
accept_header_value="application/json",
|
|
154
|
+
http_headers=http_headers,
|
|
155
|
+
security=self.sdk_configuration.security,
|
|
156
|
+
allow_empty_value=None,
|
|
157
|
+
timeout_ms=timeout_ms,
|
|
158
|
+
)
|
|
159
|
+
|
|
160
|
+
if retries == UNSET:
|
|
161
|
+
if self.sdk_configuration.retry_config is not UNSET:
|
|
162
|
+
retries = self.sdk_configuration.retry_config
|
|
163
|
+
|
|
164
|
+
retry_config = None
|
|
165
|
+
if isinstance(retries, utils.RetryConfig):
|
|
166
|
+
retry_config = (retries, ["429", "500", "502", "503", "504"])
|
|
167
|
+
|
|
168
|
+
http_res = await self.do_request_async(
|
|
169
|
+
hook_ctx=HookContext(
|
|
170
|
+
config=self.sdk_configuration,
|
|
171
|
+
base_url=base_url or "",
|
|
172
|
+
operation_id="getHealthcareCareplan",
|
|
173
|
+
oauth2_scopes=None,
|
|
174
|
+
security_source=self.sdk_configuration.security,
|
|
175
|
+
tags=["healthcare", "careplan"],
|
|
176
|
+
extensions=None,
|
|
177
|
+
),
|
|
178
|
+
request=req,
|
|
179
|
+
is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c),
|
|
180
|
+
retry_config=retry_config,
|
|
181
|
+
)
|
|
182
|
+
|
|
183
|
+
if utils.match_response(http_res, "200", "application/json"):
|
|
184
|
+
return operations.GetHealthcareCareplanResponse(
|
|
185
|
+
healthcare_careplan=unmarshal_json_response(
|
|
186
|
+
Optional[shared.HealthcareCareplan], http_res
|
|
187
|
+
),
|
|
188
|
+
status_code=http_res.status_code,
|
|
189
|
+
content_type=http_res.headers.get("Content-Type") or "",
|
|
190
|
+
raw_response=http_res,
|
|
191
|
+
)
|
|
192
|
+
if utils.match_response(http_res, "4XX", "*"):
|
|
193
|
+
http_res_text = await utils.stream_to_text_async(http_res)
|
|
194
|
+
raise errors.SDKError("API error occurred", http_res, http_res_text)
|
|
195
|
+
if utils.match_response(http_res, "5XX", "*"):
|
|
196
|
+
http_res_text = await utils.stream_to_text_async(http_res)
|
|
197
|
+
raise errors.SDKError("API error occurred", http_res, http_res_text)
|
|
198
|
+
|
|
199
|
+
raise errors.SDKError("Unexpected response received", http_res)
|
|
200
|
+
|
|
201
|
+
def list_healthcare_careplans(
|
|
202
|
+
self,
|
|
203
|
+
*,
|
|
204
|
+
request: Union[
|
|
205
|
+
operations.ListHealthcareCareplansRequest,
|
|
206
|
+
operations.ListHealthcareCareplansRequestTypedDict,
|
|
207
|
+
],
|
|
208
|
+
retries: OptionalNullable[utils.RetryConfig] = UNSET,
|
|
209
|
+
server_url: Optional[str] = None,
|
|
210
|
+
timeout_ms: Optional[int] = None,
|
|
211
|
+
http_headers: Optional[Mapping[str, str]] = None,
|
|
212
|
+
) -> operations.ListHealthcareCareplansResponse:
|
|
213
|
+
r"""List all careplans
|
|
214
|
+
|
|
215
|
+
Returns a list of HealthcareCareplans. Narrow the results with the query parameters before paging, then page through them with `limit` and `offset` (the default and maximum page size depend on the integration). Use `fields` to return only the fields you need and reduce the response size. When the integration supports a total count, it is returned in the `X-Total-Count` response header. Use each item's `id` to retrieve, update, or delete it where those operations are supported.
|
|
216
|
+
|
|
217
|
+
:param request: The request object to send.
|
|
218
|
+
:param retries: Override the default retry configuration for this method
|
|
219
|
+
:param server_url: Override the default server URL for this method
|
|
220
|
+
:param timeout_ms: Override the default request timeout configuration for this method in milliseconds
|
|
221
|
+
:param http_headers: Additional headers to set or replace on requests.
|
|
222
|
+
"""
|
|
223
|
+
base_url = None
|
|
224
|
+
url_variables = None
|
|
225
|
+
if timeout_ms is None:
|
|
226
|
+
timeout_ms = self.sdk_configuration.timeout_ms
|
|
227
|
+
|
|
228
|
+
if server_url is not None:
|
|
229
|
+
base_url = server_url
|
|
230
|
+
else:
|
|
231
|
+
base_url = self._get_url(base_url, url_variables)
|
|
232
|
+
|
|
233
|
+
if not isinstance(request, BaseModel):
|
|
234
|
+
request = utils.unmarshal(
|
|
235
|
+
request, operations.ListHealthcareCareplansRequest
|
|
236
|
+
)
|
|
237
|
+
request = cast(operations.ListHealthcareCareplansRequest, request)
|
|
238
|
+
|
|
239
|
+
req = self._build_request(
|
|
240
|
+
method="GET",
|
|
241
|
+
path="/healthcare/{connection_id}/careplan",
|
|
242
|
+
base_url=base_url,
|
|
243
|
+
url_variables=url_variables,
|
|
244
|
+
request=request,
|
|
245
|
+
request_body_required=False,
|
|
246
|
+
request_has_path_params=True,
|
|
247
|
+
request_has_query_params=True,
|
|
248
|
+
user_agent_header="user-agent",
|
|
249
|
+
accept_header_value="application/json",
|
|
250
|
+
http_headers=http_headers,
|
|
251
|
+
security=self.sdk_configuration.security,
|
|
252
|
+
allow_empty_value=None,
|
|
253
|
+
timeout_ms=timeout_ms,
|
|
254
|
+
)
|
|
255
|
+
|
|
256
|
+
if retries == UNSET:
|
|
257
|
+
if self.sdk_configuration.retry_config is not UNSET:
|
|
258
|
+
retries = self.sdk_configuration.retry_config
|
|
259
|
+
|
|
260
|
+
retry_config = None
|
|
261
|
+
if isinstance(retries, utils.RetryConfig):
|
|
262
|
+
retry_config = (retries, ["429", "500", "502", "503", "504"])
|
|
263
|
+
|
|
264
|
+
http_res = self.do_request(
|
|
265
|
+
hook_ctx=HookContext(
|
|
266
|
+
config=self.sdk_configuration,
|
|
267
|
+
base_url=base_url or "",
|
|
268
|
+
operation_id="listHealthcareCareplans",
|
|
269
|
+
oauth2_scopes=None,
|
|
270
|
+
security_source=self.sdk_configuration.security,
|
|
271
|
+
tags=["healthcare", "careplan"],
|
|
272
|
+
extensions=None,
|
|
273
|
+
),
|
|
274
|
+
request=req,
|
|
275
|
+
is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c),
|
|
276
|
+
retry_config=retry_config,
|
|
277
|
+
)
|
|
278
|
+
|
|
279
|
+
if utils.match_response(http_res, "200", "application/json"):
|
|
280
|
+
return operations.ListHealthcareCareplansResponse(
|
|
281
|
+
healthcare_careplans=unmarshal_json_response(
|
|
282
|
+
Optional[List[shared.HealthcareCareplan]], http_res
|
|
283
|
+
),
|
|
284
|
+
status_code=http_res.status_code,
|
|
285
|
+
content_type=http_res.headers.get("Content-Type") or "",
|
|
286
|
+
raw_response=http_res,
|
|
287
|
+
)
|
|
288
|
+
if utils.match_response(http_res, "4XX", "*"):
|
|
289
|
+
http_res_text = utils.stream_to_text(http_res)
|
|
290
|
+
raise errors.SDKError("API error occurred", http_res, http_res_text)
|
|
291
|
+
if utils.match_response(http_res, "5XX", "*"):
|
|
292
|
+
http_res_text = utils.stream_to_text(http_res)
|
|
293
|
+
raise errors.SDKError("API error occurred", http_res, http_res_text)
|
|
294
|
+
|
|
295
|
+
raise errors.SDKError("Unexpected response received", http_res)
|
|
296
|
+
|
|
297
|
+
async def list_healthcare_careplans_async(
|
|
298
|
+
self,
|
|
299
|
+
*,
|
|
300
|
+
request: Union[
|
|
301
|
+
operations.ListHealthcareCareplansRequest,
|
|
302
|
+
operations.ListHealthcareCareplansRequestTypedDict,
|
|
303
|
+
],
|
|
304
|
+
retries: OptionalNullable[utils.RetryConfig] = UNSET,
|
|
305
|
+
server_url: Optional[str] = None,
|
|
306
|
+
timeout_ms: Optional[int] = None,
|
|
307
|
+
http_headers: Optional[Mapping[str, str]] = None,
|
|
308
|
+
) -> operations.ListHealthcareCareplansResponse:
|
|
309
|
+
r"""List all careplans
|
|
310
|
+
|
|
311
|
+
Returns a list of HealthcareCareplans. Narrow the results with the query parameters before paging, then page through them with `limit` and `offset` (the default and maximum page size depend on the integration). Use `fields` to return only the fields you need and reduce the response size. When the integration supports a total count, it is returned in the `X-Total-Count` response header. Use each item's `id` to retrieve, update, or delete it where those operations are supported.
|
|
312
|
+
|
|
313
|
+
:param request: The request object to send.
|
|
314
|
+
:param retries: Override the default retry configuration for this method
|
|
315
|
+
:param server_url: Override the default server URL for this method
|
|
316
|
+
:param timeout_ms: Override the default request timeout configuration for this method in milliseconds
|
|
317
|
+
:param http_headers: Additional headers to set or replace on requests.
|
|
318
|
+
"""
|
|
319
|
+
base_url = None
|
|
320
|
+
url_variables = None
|
|
321
|
+
if timeout_ms is None:
|
|
322
|
+
timeout_ms = self.sdk_configuration.timeout_ms
|
|
323
|
+
|
|
324
|
+
if server_url is not None:
|
|
325
|
+
base_url = server_url
|
|
326
|
+
else:
|
|
327
|
+
base_url = self._get_url(base_url, url_variables)
|
|
328
|
+
|
|
329
|
+
if not isinstance(request, BaseModel):
|
|
330
|
+
request = utils.unmarshal(
|
|
331
|
+
request, operations.ListHealthcareCareplansRequest
|
|
332
|
+
)
|
|
333
|
+
request = cast(operations.ListHealthcareCareplansRequest, request)
|
|
334
|
+
|
|
335
|
+
req = self._build_request_async(
|
|
336
|
+
method="GET",
|
|
337
|
+
path="/healthcare/{connection_id}/careplan",
|
|
338
|
+
base_url=base_url,
|
|
339
|
+
url_variables=url_variables,
|
|
340
|
+
request=request,
|
|
341
|
+
request_body_required=False,
|
|
342
|
+
request_has_path_params=True,
|
|
343
|
+
request_has_query_params=True,
|
|
344
|
+
user_agent_header="user-agent",
|
|
345
|
+
accept_header_value="application/json",
|
|
346
|
+
http_headers=http_headers,
|
|
347
|
+
security=self.sdk_configuration.security,
|
|
348
|
+
allow_empty_value=None,
|
|
349
|
+
timeout_ms=timeout_ms,
|
|
350
|
+
)
|
|
351
|
+
|
|
352
|
+
if retries == UNSET:
|
|
353
|
+
if self.sdk_configuration.retry_config is not UNSET:
|
|
354
|
+
retries = self.sdk_configuration.retry_config
|
|
355
|
+
|
|
356
|
+
retry_config = None
|
|
357
|
+
if isinstance(retries, utils.RetryConfig):
|
|
358
|
+
retry_config = (retries, ["429", "500", "502", "503", "504"])
|
|
359
|
+
|
|
360
|
+
http_res = await self.do_request_async(
|
|
361
|
+
hook_ctx=HookContext(
|
|
362
|
+
config=self.sdk_configuration,
|
|
363
|
+
base_url=base_url or "",
|
|
364
|
+
operation_id="listHealthcareCareplans",
|
|
365
|
+
oauth2_scopes=None,
|
|
366
|
+
security_source=self.sdk_configuration.security,
|
|
367
|
+
tags=["healthcare", "careplan"],
|
|
368
|
+
extensions=None,
|
|
369
|
+
),
|
|
370
|
+
request=req,
|
|
371
|
+
is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c),
|
|
372
|
+
retry_config=retry_config,
|
|
373
|
+
)
|
|
374
|
+
|
|
375
|
+
if utils.match_response(http_res, "200", "application/json"):
|
|
376
|
+
return operations.ListHealthcareCareplansResponse(
|
|
377
|
+
healthcare_careplans=unmarshal_json_response(
|
|
378
|
+
Optional[List[shared.HealthcareCareplan]], http_res
|
|
379
|
+
),
|
|
380
|
+
status_code=http_res.status_code,
|
|
381
|
+
content_type=http_res.headers.get("Content-Type") or "",
|
|
382
|
+
raw_response=http_res,
|
|
383
|
+
)
|
|
384
|
+
if utils.match_response(http_res, "4XX", "*"):
|
|
385
|
+
http_res_text = await utils.stream_to_text_async(http_res)
|
|
386
|
+
raise errors.SDKError("API error occurred", http_res, http_res_text)
|
|
387
|
+
if utils.match_response(http_res, "5XX", "*"):
|
|
388
|
+
http_res_text = await utils.stream_to_text_async(http_res)
|
|
389
|
+
raise errors.SDKError("API error occurred", http_res, http_res_text)
|
|
390
|
+
|
|
391
|
+
raise errors.SDKError("Unexpected response received", http_res)
|