apex-dispatch-api-client 0.7.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.
- apex_dispatch_api_client/__about__.py +15 -0
- apex_dispatch_api_client/__init__.py +8 -0
- apex_dispatch_api_client/api/__init__.py +1 -0
- apex_dispatch_api_client/api/default/__init__.py +1 -0
- apex_dispatch_api_client/api/default/health_health_get.py +85 -0
- apex_dispatch_api_client/api/unit_jobs/__init__.py +1 -0
- apex_dispatch_api_client/api/unit_jobs/create_sync_job_sync_jobs_post.py +178 -0
- apex_dispatch_api_client/api/unit_jobs/create_unit_job_unit_jobs_post.py +180 -0
- apex_dispatch_api_client/api/unit_jobs/delete_job_unit_jobs_job_id_delete.py +170 -0
- apex_dispatch_api_client/api/unit_jobs/get_job_params_params_post.py +179 -0
- apex_dispatch_api_client/api/unit_jobs/get_job_results_unit_jobs_job_id_results_get.py +186 -0
- apex_dispatch_api_client/api/unit_jobs/get_job_unit_jobs_job_id_get.py +172 -0
- apex_dispatch_api_client/api/upscale_tasks/__init__.py +1 -0
- apex_dispatch_api_client/api/upscale_tasks/create_upscale_task_upscale_tasks_post.py +180 -0
- apex_dispatch_api_client/api/upscale_tasks/get_jobs_status_jobs_status_get.py +192 -0
- apex_dispatch_api_client/api/upscale_tasks/get_upscale_task_upscale_tasks_task_id_get.py +172 -0
- apex_dispatch_api_client/api/upscale_tasks/split_in_tiles_tiles_post.py +184 -0
- apex_dispatch_api_client/client.py +282 -0
- apex_dispatch_api_client/errors.py +16 -0
- apex_dispatch_api_client/models/__init__.py +99 -0
- apex_dispatch_api_client/models/asset.py +155 -0
- apex_dispatch_api_client/models/base_job_request.py +104 -0
- apex_dispatch_api_client/models/base_job_request_parameters.py +47 -0
- apex_dispatch_api_client/models/collection.py +332 -0
- apex_dispatch_api_client/models/collection_assets_type_0.py +60 -0
- apex_dispatch_api_client/models/collection_summaries_type_0.py +109 -0
- apex_dispatch_api_client/models/collection_summaries_type_0_additional_property_type_2.py +47 -0
- apex_dispatch_api_client/models/error_response.py +138 -0
- apex_dispatch_api_client/models/error_response_details_type_0.py +47 -0
- apex_dispatch_api_client/models/extent.py +80 -0
- apex_dispatch_api_client/models/geometry_collection.py +247 -0
- apex_dispatch_api_client/models/grid_type_enum.py +9 -0
- apex_dispatch_api_client/models/http_validation_error.py +79 -0
- apex_dispatch_api_client/models/jobs_filter.py +9 -0
- apex_dispatch_api_client/models/jobs_status_response.py +97 -0
- apex_dispatch_api_client/models/line_string.py +163 -0
- apex_dispatch_api_client/models/link.py +123 -0
- apex_dispatch_api_client/models/mime_types.py +37 -0
- apex_dispatch_api_client/models/multi_line_string.py +180 -0
- apex_dispatch_api_client/models/multi_point.py +163 -0
- apex_dispatch_api_client/models/multi_polygon.py +191 -0
- apex_dispatch_api_client/models/output_format_enum.py +11 -0
- apex_dispatch_api_client/models/param_request.py +77 -0
- apex_dispatch_api_client/models/param_type_enum.py +16 -0
- apex_dispatch_api_client/models/parameter.py +108 -0
- apex_dispatch_api_client/models/parameter_dimension.py +69 -0
- apex_dispatch_api_client/models/point.py +151 -0
- apex_dispatch_api_client/models/polygon.py +180 -0
- apex_dispatch_api_client/models/process_type_enum.py +9 -0
- apex_dispatch_api_client/models/processing_job.py +130 -0
- apex_dispatch_api_client/models/processing_job_parameters.py +47 -0
- apex_dispatch_api_client/models/processing_job_summary.py +116 -0
- apex_dispatch_api_client/models/processing_job_summary_parameters.py +47 -0
- apex_dispatch_api_client/models/processing_status_enum.py +14 -0
- apex_dispatch_api_client/models/provider.py +135 -0
- apex_dispatch_api_client/models/range_.py +79 -0
- apex_dispatch_api_client/models/service_details.py +95 -0
- apex_dispatch_api_client/models/spatial_extent.py +96 -0
- apex_dispatch_api_client/models/tile_request.py +77 -0
- apex_dispatch_api_client/models/time_interval.py +99 -0
- apex_dispatch_api_client/models/upscaling_task.py +138 -0
- apex_dispatch_api_client/models/upscaling_task_request.py +118 -0
- apex_dispatch_api_client/models/upscaling_task_request_parameters.py +47 -0
- apex_dispatch_api_client/models/upscaling_task_summary.py +88 -0
- apex_dispatch_api_client/models/validation_error.py +123 -0
- apex_dispatch_api_client/models/validation_error_context.py +47 -0
- apex_dispatch_api_client/types.py +54 -0
- apex_dispatch_api_client-0.7.2.dist-info/METADATA +167 -0
- apex_dispatch_api_client-0.7.2.dist-info/RECORD +71 -0
- apex_dispatch_api_client-0.7.2.dist-info/WHEEL +4 -0
- apex_dispatch_api_client-0.7.2.dist-info/licenses/LICENSE +202 -0
|
@@ -0,0 +1,192 @@
|
|
|
1
|
+
from http import HTTPStatus
|
|
2
|
+
from typing import Any
|
|
3
|
+
|
|
4
|
+
import httpx
|
|
5
|
+
|
|
6
|
+
from ... import errors
|
|
7
|
+
from ...client import AuthenticatedClient, Client
|
|
8
|
+
from ...models.error_response import ErrorResponse
|
|
9
|
+
from ...models.http_validation_error import HTTPValidationError
|
|
10
|
+
from ...models.jobs_filter import JobsFilter
|
|
11
|
+
from ...models.jobs_status_response import JobsStatusResponse
|
|
12
|
+
from ...types import UNSET, Response, Unset
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
def _get_kwargs(
|
|
16
|
+
*,
|
|
17
|
+
filter_: list[JobsFilter] | Unset = UNSET,
|
|
18
|
+
) -> dict[str, Any]:
|
|
19
|
+
|
|
20
|
+
params: dict[str, Any] = {}
|
|
21
|
+
|
|
22
|
+
json_filter_: list[str] | Unset = UNSET
|
|
23
|
+
if not isinstance(filter_, Unset):
|
|
24
|
+
json_filter_ = []
|
|
25
|
+
for filter_item_data in filter_:
|
|
26
|
+
filter_item = filter_item_data.value
|
|
27
|
+
json_filter_.append(filter_item)
|
|
28
|
+
|
|
29
|
+
params["filter"] = json_filter_
|
|
30
|
+
|
|
31
|
+
params = {k: v for k, v in params.items() if v is not UNSET and v is not None}
|
|
32
|
+
|
|
33
|
+
_kwargs: dict[str, Any] = {
|
|
34
|
+
"method": "get",
|
|
35
|
+
"url": "/jobs_status",
|
|
36
|
+
"params": params,
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
return _kwargs
|
|
40
|
+
|
|
41
|
+
|
|
42
|
+
def _parse_response(
|
|
43
|
+
*, client: AuthenticatedClient | Client, response: httpx.Response
|
|
44
|
+
) -> ErrorResponse | HTTPValidationError | JobsStatusResponse | None:
|
|
45
|
+
if response.status_code == 200:
|
|
46
|
+
response_200 = JobsStatusResponse.from_dict(response.json())
|
|
47
|
+
|
|
48
|
+
return response_200
|
|
49
|
+
|
|
50
|
+
if response.status_code == 422:
|
|
51
|
+
response_422 = HTTPValidationError.from_dict(response.json())
|
|
52
|
+
|
|
53
|
+
return response_422
|
|
54
|
+
|
|
55
|
+
if response.status_code == 500:
|
|
56
|
+
response_500 = ErrorResponse.from_dict(response.json())
|
|
57
|
+
|
|
58
|
+
return response_500
|
|
59
|
+
|
|
60
|
+
if client.raise_on_unexpected_status:
|
|
61
|
+
raise errors.UnexpectedStatus(response.status_code, response.content)
|
|
62
|
+
else:
|
|
63
|
+
return None
|
|
64
|
+
|
|
65
|
+
|
|
66
|
+
def _build_response(
|
|
67
|
+
*, client: AuthenticatedClient | Client, response: httpx.Response
|
|
68
|
+
) -> Response[ErrorResponse | HTTPValidationError | JobsStatusResponse]:
|
|
69
|
+
return Response(
|
|
70
|
+
status_code=HTTPStatus(response.status_code),
|
|
71
|
+
content=response.content,
|
|
72
|
+
headers=response.headers,
|
|
73
|
+
parsed=_parse_response(client=client, response=response),
|
|
74
|
+
)
|
|
75
|
+
|
|
76
|
+
|
|
77
|
+
def sync_detailed(
|
|
78
|
+
*,
|
|
79
|
+
client: AuthenticatedClient,
|
|
80
|
+
filter_: list[JobsFilter] | Unset = UNSET,
|
|
81
|
+
) -> Response[ErrorResponse | HTTPValidationError | JobsStatusResponse]:
|
|
82
|
+
"""Get a list of all upscaling tasks & processing jobs for the authenticated user
|
|
83
|
+
|
|
84
|
+
Return combined list of upscaling tasks and processing jobs for the authenticated user.
|
|
85
|
+
|
|
86
|
+
Args:
|
|
87
|
+
filter_ (list[JobsFilter] | Unset): Filter jobs: upscaling, processing. Can be provided
|
|
88
|
+
multiple times.
|
|
89
|
+
|
|
90
|
+
Raises:
|
|
91
|
+
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
|
|
92
|
+
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
|
93
|
+
|
|
94
|
+
Returns:
|
|
95
|
+
Response[ErrorResponse | HTTPValidationError | JobsStatusResponse]
|
|
96
|
+
"""
|
|
97
|
+
|
|
98
|
+
kwargs = _get_kwargs(
|
|
99
|
+
filter_=filter_,
|
|
100
|
+
)
|
|
101
|
+
|
|
102
|
+
response = client.get_httpx_client().request(
|
|
103
|
+
**kwargs,
|
|
104
|
+
)
|
|
105
|
+
|
|
106
|
+
return _build_response(client=client, response=response)
|
|
107
|
+
|
|
108
|
+
|
|
109
|
+
def sync(
|
|
110
|
+
*,
|
|
111
|
+
client: AuthenticatedClient,
|
|
112
|
+
filter_: list[JobsFilter] | Unset = UNSET,
|
|
113
|
+
) -> ErrorResponse | HTTPValidationError | JobsStatusResponse | None:
|
|
114
|
+
"""Get a list of all upscaling tasks & processing jobs for the authenticated user
|
|
115
|
+
|
|
116
|
+
Return combined list of upscaling tasks and processing jobs for the authenticated user.
|
|
117
|
+
|
|
118
|
+
Args:
|
|
119
|
+
filter_ (list[JobsFilter] | Unset): Filter jobs: upscaling, processing. Can be provided
|
|
120
|
+
multiple times.
|
|
121
|
+
|
|
122
|
+
Raises:
|
|
123
|
+
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
|
|
124
|
+
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
|
125
|
+
|
|
126
|
+
Returns:
|
|
127
|
+
ErrorResponse | HTTPValidationError | JobsStatusResponse
|
|
128
|
+
"""
|
|
129
|
+
|
|
130
|
+
return sync_detailed(
|
|
131
|
+
client=client,
|
|
132
|
+
filter_=filter_,
|
|
133
|
+
).parsed
|
|
134
|
+
|
|
135
|
+
|
|
136
|
+
async def asyncio_detailed(
|
|
137
|
+
*,
|
|
138
|
+
client: AuthenticatedClient,
|
|
139
|
+
filter_: list[JobsFilter] | Unset = UNSET,
|
|
140
|
+
) -> Response[ErrorResponse | HTTPValidationError | JobsStatusResponse]:
|
|
141
|
+
"""Get a list of all upscaling tasks & processing jobs for the authenticated user
|
|
142
|
+
|
|
143
|
+
Return combined list of upscaling tasks and processing jobs for the authenticated user.
|
|
144
|
+
|
|
145
|
+
Args:
|
|
146
|
+
filter_ (list[JobsFilter] | Unset): Filter jobs: upscaling, processing. Can be provided
|
|
147
|
+
multiple times.
|
|
148
|
+
|
|
149
|
+
Raises:
|
|
150
|
+
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
|
|
151
|
+
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
|
152
|
+
|
|
153
|
+
Returns:
|
|
154
|
+
Response[ErrorResponse | HTTPValidationError | JobsStatusResponse]
|
|
155
|
+
"""
|
|
156
|
+
|
|
157
|
+
kwargs = _get_kwargs(
|
|
158
|
+
filter_=filter_,
|
|
159
|
+
)
|
|
160
|
+
|
|
161
|
+
response = await client.get_async_httpx_client().request(**kwargs)
|
|
162
|
+
|
|
163
|
+
return _build_response(client=client, response=response)
|
|
164
|
+
|
|
165
|
+
|
|
166
|
+
async def asyncio(
|
|
167
|
+
*,
|
|
168
|
+
client: AuthenticatedClient,
|
|
169
|
+
filter_: list[JobsFilter] | Unset = UNSET,
|
|
170
|
+
) -> ErrorResponse | HTTPValidationError | JobsStatusResponse | None:
|
|
171
|
+
"""Get a list of all upscaling tasks & processing jobs for the authenticated user
|
|
172
|
+
|
|
173
|
+
Return combined list of upscaling tasks and processing jobs for the authenticated user.
|
|
174
|
+
|
|
175
|
+
Args:
|
|
176
|
+
filter_ (list[JobsFilter] | Unset): Filter jobs: upscaling, processing. Can be provided
|
|
177
|
+
multiple times.
|
|
178
|
+
|
|
179
|
+
Raises:
|
|
180
|
+
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
|
|
181
|
+
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
|
182
|
+
|
|
183
|
+
Returns:
|
|
184
|
+
ErrorResponse | HTTPValidationError | JobsStatusResponse
|
|
185
|
+
"""
|
|
186
|
+
|
|
187
|
+
return (
|
|
188
|
+
await asyncio_detailed(
|
|
189
|
+
client=client,
|
|
190
|
+
filter_=filter_,
|
|
191
|
+
)
|
|
192
|
+
).parsed
|
|
@@ -0,0 +1,172 @@
|
|
|
1
|
+
from http import HTTPStatus
|
|
2
|
+
from typing import Any
|
|
3
|
+
from urllib.parse import quote
|
|
4
|
+
|
|
5
|
+
import httpx
|
|
6
|
+
|
|
7
|
+
from ... import errors
|
|
8
|
+
from ...client import AuthenticatedClient, Client
|
|
9
|
+
from ...models.error_response import ErrorResponse
|
|
10
|
+
from ...models.http_validation_error import HTTPValidationError
|
|
11
|
+
from ...models.upscaling_task import UpscalingTask
|
|
12
|
+
from ...types import Response
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
def _get_kwargs(
|
|
16
|
+
task_id: int,
|
|
17
|
+
) -> dict[str, Any]:
|
|
18
|
+
|
|
19
|
+
_kwargs: dict[str, Any] = {
|
|
20
|
+
"method": "get",
|
|
21
|
+
"url": "/upscale_tasks/{task_id}".format(
|
|
22
|
+
task_id=quote(str(task_id), safe=""),
|
|
23
|
+
),
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
return _kwargs
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
def _parse_response(
|
|
30
|
+
*, client: AuthenticatedClient | Client, response: httpx.Response
|
|
31
|
+
) -> ErrorResponse | HTTPValidationError | UpscalingTask | None:
|
|
32
|
+
if response.status_code == 200:
|
|
33
|
+
response_200 = UpscalingTask.from_dict(response.json())
|
|
34
|
+
|
|
35
|
+
return response_200
|
|
36
|
+
|
|
37
|
+
if response.status_code == 404:
|
|
38
|
+
response_404 = ErrorResponse.from_dict(response.json())
|
|
39
|
+
|
|
40
|
+
return response_404
|
|
41
|
+
|
|
42
|
+
if response.status_code == 422:
|
|
43
|
+
response_422 = HTTPValidationError.from_dict(response.json())
|
|
44
|
+
|
|
45
|
+
return response_422
|
|
46
|
+
|
|
47
|
+
if response.status_code == 500:
|
|
48
|
+
response_500 = ErrorResponse.from_dict(response.json())
|
|
49
|
+
|
|
50
|
+
return response_500
|
|
51
|
+
|
|
52
|
+
if client.raise_on_unexpected_status:
|
|
53
|
+
raise errors.UnexpectedStatus(response.status_code, response.content)
|
|
54
|
+
else:
|
|
55
|
+
return None
|
|
56
|
+
|
|
57
|
+
|
|
58
|
+
def _build_response(
|
|
59
|
+
*, client: AuthenticatedClient | Client, response: httpx.Response
|
|
60
|
+
) -> Response[ErrorResponse | HTTPValidationError | UpscalingTask]:
|
|
61
|
+
return Response(
|
|
62
|
+
status_code=HTTPStatus(response.status_code),
|
|
63
|
+
content=response.content,
|
|
64
|
+
headers=response.headers,
|
|
65
|
+
parsed=_parse_response(client=client, response=response),
|
|
66
|
+
)
|
|
67
|
+
|
|
68
|
+
|
|
69
|
+
def sync_detailed(
|
|
70
|
+
task_id: int,
|
|
71
|
+
*,
|
|
72
|
+
client: AuthenticatedClient,
|
|
73
|
+
) -> Response[ErrorResponse | HTTPValidationError | UpscalingTask]:
|
|
74
|
+
"""Get Upscale Task
|
|
75
|
+
|
|
76
|
+
Args:
|
|
77
|
+
task_id (int):
|
|
78
|
+
|
|
79
|
+
Raises:
|
|
80
|
+
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
|
|
81
|
+
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
|
82
|
+
|
|
83
|
+
Returns:
|
|
84
|
+
Response[ErrorResponse | HTTPValidationError | UpscalingTask]
|
|
85
|
+
"""
|
|
86
|
+
|
|
87
|
+
kwargs = _get_kwargs(
|
|
88
|
+
task_id=task_id,
|
|
89
|
+
)
|
|
90
|
+
|
|
91
|
+
response = client.get_httpx_client().request(
|
|
92
|
+
**kwargs,
|
|
93
|
+
)
|
|
94
|
+
|
|
95
|
+
return _build_response(client=client, response=response)
|
|
96
|
+
|
|
97
|
+
|
|
98
|
+
def sync(
|
|
99
|
+
task_id: int,
|
|
100
|
+
*,
|
|
101
|
+
client: AuthenticatedClient,
|
|
102
|
+
) -> ErrorResponse | HTTPValidationError | UpscalingTask | None:
|
|
103
|
+
"""Get Upscale Task
|
|
104
|
+
|
|
105
|
+
Args:
|
|
106
|
+
task_id (int):
|
|
107
|
+
|
|
108
|
+
Raises:
|
|
109
|
+
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
|
|
110
|
+
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
|
111
|
+
|
|
112
|
+
Returns:
|
|
113
|
+
ErrorResponse | HTTPValidationError | UpscalingTask
|
|
114
|
+
"""
|
|
115
|
+
|
|
116
|
+
return sync_detailed(
|
|
117
|
+
task_id=task_id,
|
|
118
|
+
client=client,
|
|
119
|
+
).parsed
|
|
120
|
+
|
|
121
|
+
|
|
122
|
+
async def asyncio_detailed(
|
|
123
|
+
task_id: int,
|
|
124
|
+
*,
|
|
125
|
+
client: AuthenticatedClient,
|
|
126
|
+
) -> Response[ErrorResponse | HTTPValidationError | UpscalingTask]:
|
|
127
|
+
"""Get Upscale Task
|
|
128
|
+
|
|
129
|
+
Args:
|
|
130
|
+
task_id (int):
|
|
131
|
+
|
|
132
|
+
Raises:
|
|
133
|
+
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
|
|
134
|
+
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
|
135
|
+
|
|
136
|
+
Returns:
|
|
137
|
+
Response[ErrorResponse | HTTPValidationError | UpscalingTask]
|
|
138
|
+
"""
|
|
139
|
+
|
|
140
|
+
kwargs = _get_kwargs(
|
|
141
|
+
task_id=task_id,
|
|
142
|
+
)
|
|
143
|
+
|
|
144
|
+
response = await client.get_async_httpx_client().request(**kwargs)
|
|
145
|
+
|
|
146
|
+
return _build_response(client=client, response=response)
|
|
147
|
+
|
|
148
|
+
|
|
149
|
+
async def asyncio(
|
|
150
|
+
task_id: int,
|
|
151
|
+
*,
|
|
152
|
+
client: AuthenticatedClient,
|
|
153
|
+
) -> ErrorResponse | HTTPValidationError | UpscalingTask | None:
|
|
154
|
+
"""Get Upscale Task
|
|
155
|
+
|
|
156
|
+
Args:
|
|
157
|
+
task_id (int):
|
|
158
|
+
|
|
159
|
+
Raises:
|
|
160
|
+
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
|
|
161
|
+
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
|
162
|
+
|
|
163
|
+
Returns:
|
|
164
|
+
ErrorResponse | HTTPValidationError | UpscalingTask
|
|
165
|
+
"""
|
|
166
|
+
|
|
167
|
+
return (
|
|
168
|
+
await asyncio_detailed(
|
|
169
|
+
task_id=task_id,
|
|
170
|
+
client=client,
|
|
171
|
+
)
|
|
172
|
+
).parsed
|
|
@@ -0,0 +1,184 @@
|
|
|
1
|
+
from http import HTTPStatus
|
|
2
|
+
from typing import Any
|
|
3
|
+
|
|
4
|
+
import httpx
|
|
5
|
+
|
|
6
|
+
from ... import errors
|
|
7
|
+
from ...client import AuthenticatedClient, Client
|
|
8
|
+
from ...models.error_response import ErrorResponse
|
|
9
|
+
from ...models.geometry_collection import GeometryCollection
|
|
10
|
+
from ...models.http_validation_error import HTTPValidationError
|
|
11
|
+
from ...models.tile_request import TileRequest
|
|
12
|
+
from ...types import Response
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
def _get_kwargs(
|
|
16
|
+
*,
|
|
17
|
+
body: TileRequest,
|
|
18
|
+
) -> dict[str, Any]:
|
|
19
|
+
headers: dict[str, Any] = {}
|
|
20
|
+
|
|
21
|
+
_kwargs: dict[str, Any] = {
|
|
22
|
+
"method": "post",
|
|
23
|
+
"url": "/tiles",
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
_kwargs["json"] = body.to_dict()
|
|
27
|
+
|
|
28
|
+
headers["Content-Type"] = "application/json"
|
|
29
|
+
|
|
30
|
+
_kwargs["headers"] = headers
|
|
31
|
+
return _kwargs
|
|
32
|
+
|
|
33
|
+
|
|
34
|
+
def _parse_response(
|
|
35
|
+
*, client: AuthenticatedClient | Client, response: httpx.Response
|
|
36
|
+
) -> ErrorResponse | GeometryCollection | HTTPValidationError | None:
|
|
37
|
+
if response.status_code == 201:
|
|
38
|
+
response_201 = GeometryCollection.from_dict(response.json())
|
|
39
|
+
|
|
40
|
+
return response_201
|
|
41
|
+
|
|
42
|
+
if response.status_code == 422:
|
|
43
|
+
response_422 = HTTPValidationError.from_dict(response.json())
|
|
44
|
+
|
|
45
|
+
return response_422
|
|
46
|
+
|
|
47
|
+
if response.status_code == 500:
|
|
48
|
+
response_500 = ErrorResponse.from_dict(response.json())
|
|
49
|
+
|
|
50
|
+
return response_500
|
|
51
|
+
|
|
52
|
+
if client.raise_on_unexpected_status:
|
|
53
|
+
raise errors.UnexpectedStatus(response.status_code, response.content)
|
|
54
|
+
else:
|
|
55
|
+
return None
|
|
56
|
+
|
|
57
|
+
|
|
58
|
+
def _build_response(
|
|
59
|
+
*, client: AuthenticatedClient | Client, response: httpx.Response
|
|
60
|
+
) -> Response[ErrorResponse | GeometryCollection | HTTPValidationError]:
|
|
61
|
+
return Response(
|
|
62
|
+
status_code=HTTPStatus(response.status_code),
|
|
63
|
+
content=response.content,
|
|
64
|
+
headers=response.headers,
|
|
65
|
+
parsed=_parse_response(client=client, response=response),
|
|
66
|
+
)
|
|
67
|
+
|
|
68
|
+
|
|
69
|
+
def sync_detailed(
|
|
70
|
+
*,
|
|
71
|
+
client: AuthenticatedClient | Client,
|
|
72
|
+
body: TileRequest,
|
|
73
|
+
) -> Response[ErrorResponse | GeometryCollection | HTTPValidationError]:
|
|
74
|
+
"""Split an area of interest in a list of tiles.
|
|
75
|
+
|
|
76
|
+
Given a certain area of interest and a tiling grid definition (from theservice’s Max AOI capacity),
|
|
77
|
+
calculate the number of tiles to beprocessed by the upscaling service.
|
|
78
|
+
|
|
79
|
+
Args:
|
|
80
|
+
body (TileRequest):
|
|
81
|
+
|
|
82
|
+
Raises:
|
|
83
|
+
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
|
|
84
|
+
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
|
85
|
+
|
|
86
|
+
Returns:
|
|
87
|
+
Response[ErrorResponse | GeometryCollection | HTTPValidationError]
|
|
88
|
+
"""
|
|
89
|
+
|
|
90
|
+
kwargs = _get_kwargs(
|
|
91
|
+
body=body,
|
|
92
|
+
)
|
|
93
|
+
|
|
94
|
+
response = client.get_httpx_client().request(
|
|
95
|
+
**kwargs,
|
|
96
|
+
)
|
|
97
|
+
|
|
98
|
+
return _build_response(client=client, response=response)
|
|
99
|
+
|
|
100
|
+
|
|
101
|
+
def sync(
|
|
102
|
+
*,
|
|
103
|
+
client: AuthenticatedClient | Client,
|
|
104
|
+
body: TileRequest,
|
|
105
|
+
) -> ErrorResponse | GeometryCollection | HTTPValidationError | None:
|
|
106
|
+
"""Split an area of interest in a list of tiles.
|
|
107
|
+
|
|
108
|
+
Given a certain area of interest and a tiling grid definition (from theservice’s Max AOI capacity),
|
|
109
|
+
calculate the number of tiles to beprocessed by the upscaling service.
|
|
110
|
+
|
|
111
|
+
Args:
|
|
112
|
+
body (TileRequest):
|
|
113
|
+
|
|
114
|
+
Raises:
|
|
115
|
+
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
|
|
116
|
+
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
|
117
|
+
|
|
118
|
+
Returns:
|
|
119
|
+
ErrorResponse | GeometryCollection | HTTPValidationError
|
|
120
|
+
"""
|
|
121
|
+
|
|
122
|
+
return sync_detailed(
|
|
123
|
+
client=client,
|
|
124
|
+
body=body,
|
|
125
|
+
).parsed
|
|
126
|
+
|
|
127
|
+
|
|
128
|
+
async def asyncio_detailed(
|
|
129
|
+
*,
|
|
130
|
+
client: AuthenticatedClient | Client,
|
|
131
|
+
body: TileRequest,
|
|
132
|
+
) -> Response[ErrorResponse | GeometryCollection | HTTPValidationError]:
|
|
133
|
+
"""Split an area of interest in a list of tiles.
|
|
134
|
+
|
|
135
|
+
Given a certain area of interest and a tiling grid definition (from theservice’s Max AOI capacity),
|
|
136
|
+
calculate the number of tiles to beprocessed by the upscaling service.
|
|
137
|
+
|
|
138
|
+
Args:
|
|
139
|
+
body (TileRequest):
|
|
140
|
+
|
|
141
|
+
Raises:
|
|
142
|
+
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
|
|
143
|
+
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
|
144
|
+
|
|
145
|
+
Returns:
|
|
146
|
+
Response[ErrorResponse | GeometryCollection | HTTPValidationError]
|
|
147
|
+
"""
|
|
148
|
+
|
|
149
|
+
kwargs = _get_kwargs(
|
|
150
|
+
body=body,
|
|
151
|
+
)
|
|
152
|
+
|
|
153
|
+
response = await client.get_async_httpx_client().request(**kwargs)
|
|
154
|
+
|
|
155
|
+
return _build_response(client=client, response=response)
|
|
156
|
+
|
|
157
|
+
|
|
158
|
+
async def asyncio(
|
|
159
|
+
*,
|
|
160
|
+
client: AuthenticatedClient | Client,
|
|
161
|
+
body: TileRequest,
|
|
162
|
+
) -> ErrorResponse | GeometryCollection | HTTPValidationError | None:
|
|
163
|
+
"""Split an area of interest in a list of tiles.
|
|
164
|
+
|
|
165
|
+
Given a certain area of interest and a tiling grid definition (from theservice’s Max AOI capacity),
|
|
166
|
+
calculate the number of tiles to beprocessed by the upscaling service.
|
|
167
|
+
|
|
168
|
+
Args:
|
|
169
|
+
body (TileRequest):
|
|
170
|
+
|
|
171
|
+
Raises:
|
|
172
|
+
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
|
|
173
|
+
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
|
174
|
+
|
|
175
|
+
Returns:
|
|
176
|
+
ErrorResponse | GeometryCollection | HTTPValidationError
|
|
177
|
+
"""
|
|
178
|
+
|
|
179
|
+
return (
|
|
180
|
+
await asyncio_detailed(
|
|
181
|
+
client=client,
|
|
182
|
+
body=body,
|
|
183
|
+
)
|
|
184
|
+
).parsed
|