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,15 @@
|
|
|
1
|
+
# Copyright 2026 Terradue
|
|
2
|
+
#
|
|
3
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
4
|
+
# you may not use this file except in compliance with the License.
|
|
5
|
+
# You may obtain a copy of the License at
|
|
6
|
+
#
|
|
7
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
|
8
|
+
#
|
|
9
|
+
# Unless required by applicable law or agreed to in writing, software
|
|
10
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
11
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
12
|
+
# See the License for the specific language governing permissions and
|
|
13
|
+
# limitations under the License.
|
|
14
|
+
|
|
15
|
+
__version__ = "0.7.2"
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"""Contains methods for accessing the API"""
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"""Contains endpoint functions for accessing the API"""
|
|
@@ -0,0 +1,85 @@
|
|
|
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 ...types import Response
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
def _get_kwargs() -> dict[str, Any]:
|
|
12
|
+
|
|
13
|
+
_kwargs: dict[str, Any] = {
|
|
14
|
+
"method": "get",
|
|
15
|
+
"url": "/health",
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
return _kwargs
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
def _parse_response(
|
|
22
|
+
*, client: AuthenticatedClient | Client, response: httpx.Response
|
|
23
|
+
) -> Any | None:
|
|
24
|
+
if response.status_code == 200:
|
|
25
|
+
return None
|
|
26
|
+
|
|
27
|
+
if client.raise_on_unexpected_status:
|
|
28
|
+
raise errors.UnexpectedStatus(response.status_code, response.content)
|
|
29
|
+
else:
|
|
30
|
+
return None
|
|
31
|
+
|
|
32
|
+
|
|
33
|
+
def _build_response(
|
|
34
|
+
*, client: AuthenticatedClient | Client, response: httpx.Response
|
|
35
|
+
) -> Response[Any]:
|
|
36
|
+
return Response(
|
|
37
|
+
status_code=HTTPStatus(response.status_code),
|
|
38
|
+
content=response.content,
|
|
39
|
+
headers=response.headers,
|
|
40
|
+
parsed=_parse_response(client=client, response=response),
|
|
41
|
+
)
|
|
42
|
+
|
|
43
|
+
|
|
44
|
+
def sync_detailed(
|
|
45
|
+
*,
|
|
46
|
+
client: AuthenticatedClient | Client,
|
|
47
|
+
) -> Response[Any]:
|
|
48
|
+
"""Health
|
|
49
|
+
|
|
50
|
+
Raises:
|
|
51
|
+
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
|
|
52
|
+
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
|
53
|
+
|
|
54
|
+
Returns:
|
|
55
|
+
Response[Any]
|
|
56
|
+
"""
|
|
57
|
+
|
|
58
|
+
kwargs = _get_kwargs()
|
|
59
|
+
|
|
60
|
+
response = client.get_httpx_client().request(
|
|
61
|
+
**kwargs,
|
|
62
|
+
)
|
|
63
|
+
|
|
64
|
+
return _build_response(client=client, response=response)
|
|
65
|
+
|
|
66
|
+
|
|
67
|
+
async def asyncio_detailed(
|
|
68
|
+
*,
|
|
69
|
+
client: AuthenticatedClient | Client,
|
|
70
|
+
) -> Response[Any]:
|
|
71
|
+
"""Health
|
|
72
|
+
|
|
73
|
+
Raises:
|
|
74
|
+
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
|
|
75
|
+
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
|
76
|
+
|
|
77
|
+
Returns:
|
|
78
|
+
Response[Any]
|
|
79
|
+
"""
|
|
80
|
+
|
|
81
|
+
kwargs = _get_kwargs()
|
|
82
|
+
|
|
83
|
+
response = await client.get_async_httpx_client().request(**kwargs)
|
|
84
|
+
|
|
85
|
+
return _build_response(client=client, response=response)
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"""Contains endpoint functions for accessing the API"""
|
|
@@ -0,0 +1,178 @@
|
|
|
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.base_job_request import BaseJobRequest
|
|
9
|
+
from ...models.error_response import ErrorResponse
|
|
10
|
+
from ...models.http_validation_error import HTTPValidationError
|
|
11
|
+
from ...types import Response
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
def _get_kwargs(
|
|
15
|
+
*,
|
|
16
|
+
body: BaseJobRequest,
|
|
17
|
+
) -> dict[str, Any]:
|
|
18
|
+
headers: dict[str, Any] = {}
|
|
19
|
+
|
|
20
|
+
_kwargs: dict[str, Any] = {
|
|
21
|
+
"method": "post",
|
|
22
|
+
"url": "/sync_jobs",
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
_kwargs["json"] = body.to_dict()
|
|
26
|
+
|
|
27
|
+
headers["Content-Type"] = "application/json"
|
|
28
|
+
|
|
29
|
+
_kwargs["headers"] = headers
|
|
30
|
+
return _kwargs
|
|
31
|
+
|
|
32
|
+
|
|
33
|
+
def _parse_response(
|
|
34
|
+
*, client: AuthenticatedClient | Client, response: httpx.Response
|
|
35
|
+
) -> Any | ErrorResponse | HTTPValidationError | None:
|
|
36
|
+
if response.status_code == 201:
|
|
37
|
+
response_201 = response.json()
|
|
38
|
+
return response_201
|
|
39
|
+
|
|
40
|
+
if response.status_code == 422:
|
|
41
|
+
response_422 = HTTPValidationError.from_dict(response.json())
|
|
42
|
+
|
|
43
|
+
return response_422
|
|
44
|
+
|
|
45
|
+
if response.status_code == 500:
|
|
46
|
+
response_500 = ErrorResponse.from_dict(response.json())
|
|
47
|
+
|
|
48
|
+
return response_500
|
|
49
|
+
|
|
50
|
+
if client.raise_on_unexpected_status:
|
|
51
|
+
raise errors.UnexpectedStatus(response.status_code, response.content)
|
|
52
|
+
else:
|
|
53
|
+
return None
|
|
54
|
+
|
|
55
|
+
|
|
56
|
+
def _build_response(
|
|
57
|
+
*, client: AuthenticatedClient | Client, response: httpx.Response
|
|
58
|
+
) -> Response[Any | ErrorResponse | HTTPValidationError]:
|
|
59
|
+
return Response(
|
|
60
|
+
status_code=HTTPStatus(response.status_code),
|
|
61
|
+
content=response.content,
|
|
62
|
+
headers=response.headers,
|
|
63
|
+
parsed=_parse_response(client=client, response=response),
|
|
64
|
+
)
|
|
65
|
+
|
|
66
|
+
|
|
67
|
+
def sync_detailed(
|
|
68
|
+
*,
|
|
69
|
+
client: AuthenticatedClient,
|
|
70
|
+
body: BaseJobRequest,
|
|
71
|
+
) -> Response[Any | ErrorResponse | HTTPValidationError]:
|
|
72
|
+
"""Create a new processing job
|
|
73
|
+
|
|
74
|
+
Initiate a synchronous processing job with the provided data and return the result.
|
|
75
|
+
|
|
76
|
+
Args:
|
|
77
|
+
body (BaseJobRequest):
|
|
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[Any | ErrorResponse | HTTPValidationError]
|
|
85
|
+
"""
|
|
86
|
+
|
|
87
|
+
kwargs = _get_kwargs(
|
|
88
|
+
body=body,
|
|
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
|
+
*,
|
|
100
|
+
client: AuthenticatedClient,
|
|
101
|
+
body: BaseJobRequest,
|
|
102
|
+
) -> Any | ErrorResponse | HTTPValidationError | None:
|
|
103
|
+
"""Create a new processing job
|
|
104
|
+
|
|
105
|
+
Initiate a synchronous processing job with the provided data and return the result.
|
|
106
|
+
|
|
107
|
+
Args:
|
|
108
|
+
body (BaseJobRequest):
|
|
109
|
+
|
|
110
|
+
Raises:
|
|
111
|
+
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
|
|
112
|
+
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
|
113
|
+
|
|
114
|
+
Returns:
|
|
115
|
+
Any | ErrorResponse | HTTPValidationError
|
|
116
|
+
"""
|
|
117
|
+
|
|
118
|
+
return sync_detailed(
|
|
119
|
+
client=client,
|
|
120
|
+
body=body,
|
|
121
|
+
).parsed
|
|
122
|
+
|
|
123
|
+
|
|
124
|
+
async def asyncio_detailed(
|
|
125
|
+
*,
|
|
126
|
+
client: AuthenticatedClient,
|
|
127
|
+
body: BaseJobRequest,
|
|
128
|
+
) -> Response[Any | ErrorResponse | HTTPValidationError]:
|
|
129
|
+
"""Create a new processing job
|
|
130
|
+
|
|
131
|
+
Initiate a synchronous processing job with the provided data and return the result.
|
|
132
|
+
|
|
133
|
+
Args:
|
|
134
|
+
body (BaseJobRequest):
|
|
135
|
+
|
|
136
|
+
Raises:
|
|
137
|
+
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
|
|
138
|
+
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
|
139
|
+
|
|
140
|
+
Returns:
|
|
141
|
+
Response[Any | ErrorResponse | HTTPValidationError]
|
|
142
|
+
"""
|
|
143
|
+
|
|
144
|
+
kwargs = _get_kwargs(
|
|
145
|
+
body=body,
|
|
146
|
+
)
|
|
147
|
+
|
|
148
|
+
response = await client.get_async_httpx_client().request(**kwargs)
|
|
149
|
+
|
|
150
|
+
return _build_response(client=client, response=response)
|
|
151
|
+
|
|
152
|
+
|
|
153
|
+
async def asyncio(
|
|
154
|
+
*,
|
|
155
|
+
client: AuthenticatedClient,
|
|
156
|
+
body: BaseJobRequest,
|
|
157
|
+
) -> Any | ErrorResponse | HTTPValidationError | None:
|
|
158
|
+
"""Create a new processing job
|
|
159
|
+
|
|
160
|
+
Initiate a synchronous processing job with the provided data and return the result.
|
|
161
|
+
|
|
162
|
+
Args:
|
|
163
|
+
body (BaseJobRequest):
|
|
164
|
+
|
|
165
|
+
Raises:
|
|
166
|
+
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
|
|
167
|
+
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
|
168
|
+
|
|
169
|
+
Returns:
|
|
170
|
+
Any | ErrorResponse | HTTPValidationError
|
|
171
|
+
"""
|
|
172
|
+
|
|
173
|
+
return (
|
|
174
|
+
await asyncio_detailed(
|
|
175
|
+
client=client,
|
|
176
|
+
body=body,
|
|
177
|
+
)
|
|
178
|
+
).parsed
|
|
@@ -0,0 +1,180 @@
|
|
|
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.base_job_request import BaseJobRequest
|
|
9
|
+
from ...models.error_response import ErrorResponse
|
|
10
|
+
from ...models.http_validation_error import HTTPValidationError
|
|
11
|
+
from ...models.processing_job_summary import ProcessingJobSummary
|
|
12
|
+
from ...types import Response
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
def _get_kwargs(
|
|
16
|
+
*,
|
|
17
|
+
body: BaseJobRequest,
|
|
18
|
+
) -> dict[str, Any]:
|
|
19
|
+
headers: dict[str, Any] = {}
|
|
20
|
+
|
|
21
|
+
_kwargs: dict[str, Any] = {
|
|
22
|
+
"method": "post",
|
|
23
|
+
"url": "/unit_jobs",
|
|
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 | HTTPValidationError | ProcessingJobSummary | None:
|
|
37
|
+
if response.status_code == 201:
|
|
38
|
+
response_201 = ProcessingJobSummary.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 | HTTPValidationError | ProcessingJobSummary]:
|
|
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,
|
|
72
|
+
body: BaseJobRequest,
|
|
73
|
+
) -> Response[ErrorResponse | HTTPValidationError | ProcessingJobSummary]:
|
|
74
|
+
"""Create a new processing job
|
|
75
|
+
|
|
76
|
+
Create a new processing job with the provided data.
|
|
77
|
+
|
|
78
|
+
Args:
|
|
79
|
+
body (BaseJobRequest):
|
|
80
|
+
|
|
81
|
+
Raises:
|
|
82
|
+
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
|
|
83
|
+
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
|
84
|
+
|
|
85
|
+
Returns:
|
|
86
|
+
Response[ErrorResponse | HTTPValidationError | ProcessingJobSummary]
|
|
87
|
+
"""
|
|
88
|
+
|
|
89
|
+
kwargs = _get_kwargs(
|
|
90
|
+
body=body,
|
|
91
|
+
)
|
|
92
|
+
|
|
93
|
+
response = client.get_httpx_client().request(
|
|
94
|
+
**kwargs,
|
|
95
|
+
)
|
|
96
|
+
|
|
97
|
+
return _build_response(client=client, response=response)
|
|
98
|
+
|
|
99
|
+
|
|
100
|
+
def sync(
|
|
101
|
+
*,
|
|
102
|
+
client: AuthenticatedClient,
|
|
103
|
+
body: BaseJobRequest,
|
|
104
|
+
) -> ErrorResponse | HTTPValidationError | ProcessingJobSummary | None:
|
|
105
|
+
"""Create a new processing job
|
|
106
|
+
|
|
107
|
+
Create a new processing job with the provided data.
|
|
108
|
+
|
|
109
|
+
Args:
|
|
110
|
+
body (BaseJobRequest):
|
|
111
|
+
|
|
112
|
+
Raises:
|
|
113
|
+
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
|
|
114
|
+
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
|
115
|
+
|
|
116
|
+
Returns:
|
|
117
|
+
ErrorResponse | HTTPValidationError | ProcessingJobSummary
|
|
118
|
+
"""
|
|
119
|
+
|
|
120
|
+
return sync_detailed(
|
|
121
|
+
client=client,
|
|
122
|
+
body=body,
|
|
123
|
+
).parsed
|
|
124
|
+
|
|
125
|
+
|
|
126
|
+
async def asyncio_detailed(
|
|
127
|
+
*,
|
|
128
|
+
client: AuthenticatedClient,
|
|
129
|
+
body: BaseJobRequest,
|
|
130
|
+
) -> Response[ErrorResponse | HTTPValidationError | ProcessingJobSummary]:
|
|
131
|
+
"""Create a new processing job
|
|
132
|
+
|
|
133
|
+
Create a new processing job with the provided data.
|
|
134
|
+
|
|
135
|
+
Args:
|
|
136
|
+
body (BaseJobRequest):
|
|
137
|
+
|
|
138
|
+
Raises:
|
|
139
|
+
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
|
|
140
|
+
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
|
141
|
+
|
|
142
|
+
Returns:
|
|
143
|
+
Response[ErrorResponse | HTTPValidationError | ProcessingJobSummary]
|
|
144
|
+
"""
|
|
145
|
+
|
|
146
|
+
kwargs = _get_kwargs(
|
|
147
|
+
body=body,
|
|
148
|
+
)
|
|
149
|
+
|
|
150
|
+
response = await client.get_async_httpx_client().request(**kwargs)
|
|
151
|
+
|
|
152
|
+
return _build_response(client=client, response=response)
|
|
153
|
+
|
|
154
|
+
|
|
155
|
+
async def asyncio(
|
|
156
|
+
*,
|
|
157
|
+
client: AuthenticatedClient,
|
|
158
|
+
body: BaseJobRequest,
|
|
159
|
+
) -> ErrorResponse | HTTPValidationError | ProcessingJobSummary | None:
|
|
160
|
+
"""Create a new processing job
|
|
161
|
+
|
|
162
|
+
Create a new processing job with the provided data.
|
|
163
|
+
|
|
164
|
+
Args:
|
|
165
|
+
body (BaseJobRequest):
|
|
166
|
+
|
|
167
|
+
Raises:
|
|
168
|
+
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
|
|
169
|
+
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
|
170
|
+
|
|
171
|
+
Returns:
|
|
172
|
+
ErrorResponse | HTTPValidationError | ProcessingJobSummary
|
|
173
|
+
"""
|
|
174
|
+
|
|
175
|
+
return (
|
|
176
|
+
await asyncio_detailed(
|
|
177
|
+
client=client,
|
|
178
|
+
body=body,
|
|
179
|
+
)
|
|
180
|
+
).parsed
|
|
@@ -0,0 +1,170 @@
|
|
|
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 ...types import Response
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
def _get_kwargs(
|
|
15
|
+
job_id: int,
|
|
16
|
+
) -> dict[str, Any]:
|
|
17
|
+
|
|
18
|
+
_kwargs: dict[str, Any] = {
|
|
19
|
+
"method": "delete",
|
|
20
|
+
"url": "/unit_jobs/{job_id}".format(
|
|
21
|
+
job_id=quote(str(job_id), safe=""),
|
|
22
|
+
),
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
return _kwargs
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
def _parse_response(
|
|
29
|
+
*, client: AuthenticatedClient | Client, response: httpx.Response
|
|
30
|
+
) -> Any | ErrorResponse | HTTPValidationError | None:
|
|
31
|
+
if response.status_code == 200:
|
|
32
|
+
response_200 = response.json()
|
|
33
|
+
return response_200
|
|
34
|
+
|
|
35
|
+
if response.status_code == 404:
|
|
36
|
+
response_404 = ErrorResponse.from_dict(response.json())
|
|
37
|
+
|
|
38
|
+
return response_404
|
|
39
|
+
|
|
40
|
+
if response.status_code == 422:
|
|
41
|
+
response_422 = HTTPValidationError.from_dict(response.json())
|
|
42
|
+
|
|
43
|
+
return response_422
|
|
44
|
+
|
|
45
|
+
if response.status_code == 500:
|
|
46
|
+
response_500 = ErrorResponse.from_dict(response.json())
|
|
47
|
+
|
|
48
|
+
return response_500
|
|
49
|
+
|
|
50
|
+
if client.raise_on_unexpected_status:
|
|
51
|
+
raise errors.UnexpectedStatus(response.status_code, response.content)
|
|
52
|
+
else:
|
|
53
|
+
return None
|
|
54
|
+
|
|
55
|
+
|
|
56
|
+
def _build_response(
|
|
57
|
+
*, client: AuthenticatedClient | Client, response: httpx.Response
|
|
58
|
+
) -> Response[Any | ErrorResponse | HTTPValidationError]:
|
|
59
|
+
return Response(
|
|
60
|
+
status_code=HTTPStatus(response.status_code),
|
|
61
|
+
content=response.content,
|
|
62
|
+
headers=response.headers,
|
|
63
|
+
parsed=_parse_response(client=client, response=response),
|
|
64
|
+
)
|
|
65
|
+
|
|
66
|
+
|
|
67
|
+
def sync_detailed(
|
|
68
|
+
job_id: int,
|
|
69
|
+
*,
|
|
70
|
+
client: AuthenticatedClient,
|
|
71
|
+
) -> Response[Any | ErrorResponse | HTTPValidationError]:
|
|
72
|
+
"""Delete Job
|
|
73
|
+
|
|
74
|
+
Args:
|
|
75
|
+
job_id (int):
|
|
76
|
+
|
|
77
|
+
Raises:
|
|
78
|
+
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
|
|
79
|
+
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
|
80
|
+
|
|
81
|
+
Returns:
|
|
82
|
+
Response[Any | ErrorResponse | HTTPValidationError]
|
|
83
|
+
"""
|
|
84
|
+
|
|
85
|
+
kwargs = _get_kwargs(
|
|
86
|
+
job_id=job_id,
|
|
87
|
+
)
|
|
88
|
+
|
|
89
|
+
response = client.get_httpx_client().request(
|
|
90
|
+
**kwargs,
|
|
91
|
+
)
|
|
92
|
+
|
|
93
|
+
return _build_response(client=client, response=response)
|
|
94
|
+
|
|
95
|
+
|
|
96
|
+
def sync(
|
|
97
|
+
job_id: int,
|
|
98
|
+
*,
|
|
99
|
+
client: AuthenticatedClient,
|
|
100
|
+
) -> Any | ErrorResponse | HTTPValidationError | None:
|
|
101
|
+
"""Delete Job
|
|
102
|
+
|
|
103
|
+
Args:
|
|
104
|
+
job_id (int):
|
|
105
|
+
|
|
106
|
+
Raises:
|
|
107
|
+
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
|
|
108
|
+
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
|
109
|
+
|
|
110
|
+
Returns:
|
|
111
|
+
Any | ErrorResponse | HTTPValidationError
|
|
112
|
+
"""
|
|
113
|
+
|
|
114
|
+
return sync_detailed(
|
|
115
|
+
job_id=job_id,
|
|
116
|
+
client=client,
|
|
117
|
+
).parsed
|
|
118
|
+
|
|
119
|
+
|
|
120
|
+
async def asyncio_detailed(
|
|
121
|
+
job_id: int,
|
|
122
|
+
*,
|
|
123
|
+
client: AuthenticatedClient,
|
|
124
|
+
) -> Response[Any | ErrorResponse | HTTPValidationError]:
|
|
125
|
+
"""Delete Job
|
|
126
|
+
|
|
127
|
+
Args:
|
|
128
|
+
job_id (int):
|
|
129
|
+
|
|
130
|
+
Raises:
|
|
131
|
+
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
|
|
132
|
+
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
|
133
|
+
|
|
134
|
+
Returns:
|
|
135
|
+
Response[Any | ErrorResponse | HTTPValidationError]
|
|
136
|
+
"""
|
|
137
|
+
|
|
138
|
+
kwargs = _get_kwargs(
|
|
139
|
+
job_id=job_id,
|
|
140
|
+
)
|
|
141
|
+
|
|
142
|
+
response = await client.get_async_httpx_client().request(**kwargs)
|
|
143
|
+
|
|
144
|
+
return _build_response(client=client, response=response)
|
|
145
|
+
|
|
146
|
+
|
|
147
|
+
async def asyncio(
|
|
148
|
+
job_id: int,
|
|
149
|
+
*,
|
|
150
|
+
client: AuthenticatedClient,
|
|
151
|
+
) -> Any | ErrorResponse | HTTPValidationError | None:
|
|
152
|
+
"""Delete Job
|
|
153
|
+
|
|
154
|
+
Args:
|
|
155
|
+
job_id (int):
|
|
156
|
+
|
|
157
|
+
Raises:
|
|
158
|
+
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
|
|
159
|
+
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
|
160
|
+
|
|
161
|
+
Returns:
|
|
162
|
+
Any | ErrorResponse | HTTPValidationError
|
|
163
|
+
"""
|
|
164
|
+
|
|
165
|
+
return (
|
|
166
|
+
await asyncio_detailed(
|
|
167
|
+
job_id=job_id,
|
|
168
|
+
client=client,
|
|
169
|
+
)
|
|
170
|
+
).parsed
|