osdu-python-client 0.6.5__py3-none-any.whl → 0.7.0__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.
- osdu_python_client/generated/storage/_facade.pyi +12 -0
- osdu_python_client/generated/storage/api/query/get_records_headers.py +238 -0
- osdu_python_client/generated/storage/models/__init__.py +12 -0
- osdu_python_client/generated/storage/models/multi_record_headers_info.py +101 -0
- osdu_python_client/generated/storage/models/multi_record_headers_request.py +92 -0
- osdu_python_client/generated/storage/models/multi_record_headers_request_attributes_item.py +17 -0
- osdu_python_client/generated/storage/models/record_headers_dto.py +192 -0
- osdu_python_client/generated/storage/models/record_headers_dto_tags.py +47 -0
- osdu_python_client/generated/wellbore_ddms/models/about_response.py +32 -32
- osdu_python_client/generated/wellbore_ddms/models/bulk_data_statistics_response.py +16 -16
- osdu_python_client/generated/wellbore_ddms/models/catalog_item.py +8 -8
- osdu_python_client/generated/wellbore_ddms/models/catalog_record.py +8 -8
- osdu_python_client/generated/wellbore_ddms/models/commit_session_response.py +33 -33
- osdu_python_client/generated/wellbore_ddms/models/create_data_session_request.py +10 -10
- osdu_python_client/generated/wellbore_ddms/models/curve_statistics.py +30 -30
- osdu_python_client/generated/wellbore_ddms/models/dataframe_basic_describe.py +16 -16
- osdu_python_client/generated/wellbore_ddms/models/guess_request.py +15 -15
- osdu_python_client/generated/wellbore_ddms/models/guess_response.py +20 -20
- osdu_python_client/generated/wellbore_ddms/models/main_family_catalog_item.py +8 -8
- osdu_python_client/generated/wellbore_ddms/models/record.py +119 -119
- osdu_python_client/generated/wellbore_ddms/models/session.py +33 -33
- osdu_python_client/generated/wellbore_ddms/models/storage_acl.py +8 -8
- osdu_python_client/generated/wellbore_ddms/models/version_details_response.py +55 -55
- {osdu_python_client-0.6.5.dist-info → osdu_python_client-0.7.0.dist-info}/METADATA +1 -1
- {osdu_python_client-0.6.5.dist-info → osdu_python_client-0.7.0.dist-info}/RECORD +28 -22
- {osdu_python_client-0.6.5.dist-info → osdu_python_client-0.7.0.dist-info}/WHEEL +0 -0
- {osdu_python_client-0.6.5.dist-info → osdu_python_client-0.7.0.dist-info}/licenses/LICENSE +0 -0
- {osdu_python_client-0.6.5.dist-info → osdu_python_client-0.7.0.dist-info}/top_level.txt +0 -0
|
@@ -10,6 +10,8 @@ from .types import Unset
|
|
|
10
10
|
from .models.datastore_query_result import DatastoreQueryResult
|
|
11
11
|
from .models.multi_record_ids import MultiRecordIds
|
|
12
12
|
from .models.multi_record_info import MultiRecordInfo
|
|
13
|
+
from .models.multi_record_headers_info import MultiRecordHeadersInfo
|
|
14
|
+
from .models.multi_record_headers_request import MultiRecordHeadersRequest
|
|
13
15
|
from .models.delete_records_exception import DeleteRecordsException
|
|
14
16
|
from .models.copy_record_references_model import CopyRecordReferencesModel
|
|
15
17
|
from .models.create_update_records_response import CreateUpdateRecordsResponse
|
|
@@ -61,6 +63,14 @@ class _GetRecordsAsync:
|
|
|
61
63
|
async def __call__(self, *, body: MultiRecordIds, x_collaboration: str | Unset = ..., data_partition_id: str = ...) -> MultiRecordInfo | None: ...
|
|
62
64
|
async def detailed(self, *, body: MultiRecordIds, x_collaboration: str | Unset = ..., data_partition_id: str = ...) -> Response[AppError | MultiRecordInfo]: ...
|
|
63
65
|
|
|
66
|
+
class _GetRecordsHeaders:
|
|
67
|
+
def __call__(self, *, body: MultiRecordHeadersRequest, x_collaboration: str | Unset = ..., data_partition_id: str = ...) -> MultiRecordHeadersInfo | None: ...
|
|
68
|
+
def detailed(self, *, body: MultiRecordHeadersRequest, x_collaboration: str | Unset = ..., data_partition_id: str = ...) -> Response[AppError | MultiRecordHeadersInfo]: ...
|
|
69
|
+
|
|
70
|
+
class _GetRecordsHeadersAsync:
|
|
71
|
+
async def __call__(self, *, body: MultiRecordHeadersRequest, x_collaboration: str | Unset = ..., data_partition_id: str = ...) -> MultiRecordHeadersInfo | None: ...
|
|
72
|
+
async def detailed(self, *, body: MultiRecordHeadersRequest, x_collaboration: str | Unset = ..., data_partition_id: str = ...) -> Response[AppError | MultiRecordHeadersInfo]: ...
|
|
73
|
+
|
|
64
74
|
class _BulkDeleteRecords:
|
|
65
75
|
def __call__(self, *, body: list[str], x_collaboration: str | Unset = ..., data_partition_id: str = ...) -> Any | None: ...
|
|
66
76
|
def detailed(self, *, body: list[str], x_collaboration: str | Unset = ..., data_partition_id: str = ...) -> Response[Any | AppError | DeleteRecordsException]: ...
|
|
@@ -171,6 +181,7 @@ class StorageFacade:
|
|
|
171
181
|
fetch_records: _FetchRecords
|
|
172
182
|
get_all_records_1: _GetAllRecords1
|
|
173
183
|
get_records: _GetRecords
|
|
184
|
+
get_records_headers: _GetRecordsHeaders
|
|
174
185
|
bulk_delete_records: _BulkDeleteRecords
|
|
175
186
|
copy_record_references_between_namespaces: _CopyRecordReferencesBetweenNamespaces
|
|
176
187
|
create_or_update_records: _CreateOrUpdateRecords
|
|
@@ -192,6 +203,7 @@ class AsyncStorageFacade:
|
|
|
192
203
|
fetch_records: _FetchRecordsAsync
|
|
193
204
|
get_all_records_1: _GetAllRecords1Async
|
|
194
205
|
get_records: _GetRecordsAsync
|
|
206
|
+
get_records_headers: _GetRecordsHeadersAsync
|
|
195
207
|
bulk_delete_records: _BulkDeleteRecordsAsync
|
|
196
208
|
copy_record_references_between_namespaces: _CopyRecordReferencesBetweenNamespacesAsync
|
|
197
209
|
create_or_update_records: _CreateOrUpdateRecordsAsync
|
|
@@ -0,0 +1,238 @@
|
|
|
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.app_error import AppError
|
|
9
|
+
from ...models.multi_record_headers_info import MultiRecordHeadersInfo
|
|
10
|
+
from ...models.multi_record_headers_request import MultiRecordHeadersRequest
|
|
11
|
+
from ...types import UNSET, Response, Unset
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
def _get_kwargs(
|
|
15
|
+
*,
|
|
16
|
+
body: MultiRecordHeadersRequest,
|
|
17
|
+
x_collaboration: str | Unset = UNSET,
|
|
18
|
+
data_partition_id: str,
|
|
19
|
+
) -> dict[str, Any]:
|
|
20
|
+
headers: dict[str, Any] = {}
|
|
21
|
+
if not isinstance(x_collaboration, Unset):
|
|
22
|
+
headers["x-collaboration"] = x_collaboration
|
|
23
|
+
|
|
24
|
+
headers["data-partition-id"] = data_partition_id
|
|
25
|
+
|
|
26
|
+
_kwargs: dict[str, Any] = {
|
|
27
|
+
"method": "post",
|
|
28
|
+
"url": "/query/records/headers",
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
_kwargs["json"] = body.to_dict()
|
|
32
|
+
|
|
33
|
+
headers["Content-Type"] = "application/json"
|
|
34
|
+
|
|
35
|
+
_kwargs["headers"] = headers
|
|
36
|
+
return _kwargs
|
|
37
|
+
|
|
38
|
+
|
|
39
|
+
def _parse_response(
|
|
40
|
+
*, client: AuthenticatedClient | Client, response: httpx.Response
|
|
41
|
+
) -> AppError | MultiRecordHeadersInfo | None:
|
|
42
|
+
if response.status_code == 200:
|
|
43
|
+
response_200 = MultiRecordHeadersInfo.from_dict(response.json())
|
|
44
|
+
|
|
45
|
+
return response_200
|
|
46
|
+
|
|
47
|
+
if response.status_code == 400:
|
|
48
|
+
response_400 = AppError.from_dict(response.json())
|
|
49
|
+
|
|
50
|
+
return response_400
|
|
51
|
+
|
|
52
|
+
if response.status_code == 401:
|
|
53
|
+
response_401 = AppError.from_dict(response.json())
|
|
54
|
+
|
|
55
|
+
return response_401
|
|
56
|
+
|
|
57
|
+
if response.status_code == 403:
|
|
58
|
+
response_403 = AppError.from_dict(response.json())
|
|
59
|
+
|
|
60
|
+
return response_403
|
|
61
|
+
|
|
62
|
+
if response.status_code == 404:
|
|
63
|
+
response_404 = AppError.from_dict(response.json())
|
|
64
|
+
|
|
65
|
+
return response_404
|
|
66
|
+
|
|
67
|
+
if response.status_code == 500:
|
|
68
|
+
response_500 = AppError.from_dict(response.json())
|
|
69
|
+
|
|
70
|
+
return response_500
|
|
71
|
+
|
|
72
|
+
if response.status_code == 502:
|
|
73
|
+
response_502 = AppError.from_dict(response.json())
|
|
74
|
+
|
|
75
|
+
return response_502
|
|
76
|
+
|
|
77
|
+
if response.status_code == 503:
|
|
78
|
+
response_503 = AppError.from_dict(response.json())
|
|
79
|
+
|
|
80
|
+
return response_503
|
|
81
|
+
|
|
82
|
+
if client.raise_on_unexpected_status:
|
|
83
|
+
raise errors.UnexpectedStatus(response.status_code, response.content)
|
|
84
|
+
else:
|
|
85
|
+
return None
|
|
86
|
+
|
|
87
|
+
|
|
88
|
+
def _build_response(
|
|
89
|
+
*, client: AuthenticatedClient | Client, response: httpx.Response
|
|
90
|
+
) -> Response[AppError | MultiRecordHeadersInfo]:
|
|
91
|
+
return Response(
|
|
92
|
+
status_code=HTTPStatus(response.status_code),
|
|
93
|
+
content=response.content,
|
|
94
|
+
headers=response.headers,
|
|
95
|
+
parsed=_parse_response(client=client, response=response),
|
|
96
|
+
)
|
|
97
|
+
|
|
98
|
+
|
|
99
|
+
def sync_detailed(
|
|
100
|
+
*,
|
|
101
|
+
client: AuthenticatedClient,
|
|
102
|
+
body: MultiRecordHeadersRequest,
|
|
103
|
+
x_collaboration: str | Unset = UNSET,
|
|
104
|
+
data_partition_id: str,
|
|
105
|
+
) -> Response[AppError | MultiRecordHeadersInfo]:
|
|
106
|
+
"""Fetch multiple records' headers by ID
|
|
107
|
+
|
|
108
|
+
The API fetches administrative headers (system-managed fields) for multiple records at once,
|
|
109
|
+
completely omitting the heavy data payload. Allows up to 1000 IDs.
|
|
110
|
+
|
|
111
|
+
Args:
|
|
112
|
+
x_collaboration (str | Unset):
|
|
113
|
+
data_partition_id (str):
|
|
114
|
+
body (MultiRecordHeadersRequest): Record headers query request
|
|
115
|
+
|
|
116
|
+
Raises:
|
|
117
|
+
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
|
|
118
|
+
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
|
119
|
+
|
|
120
|
+
Returns:
|
|
121
|
+
Response[AppError | MultiRecordHeadersInfo]
|
|
122
|
+
"""
|
|
123
|
+
|
|
124
|
+
kwargs = _get_kwargs(
|
|
125
|
+
body=body,
|
|
126
|
+
x_collaboration=x_collaboration,
|
|
127
|
+
data_partition_id=data_partition_id,
|
|
128
|
+
)
|
|
129
|
+
|
|
130
|
+
response = client.get_httpx_client().request(
|
|
131
|
+
**kwargs,
|
|
132
|
+
)
|
|
133
|
+
|
|
134
|
+
return _build_response(client=client, response=response)
|
|
135
|
+
|
|
136
|
+
|
|
137
|
+
def sync(
|
|
138
|
+
*,
|
|
139
|
+
client: AuthenticatedClient,
|
|
140
|
+
body: MultiRecordHeadersRequest,
|
|
141
|
+
x_collaboration: str | Unset = UNSET,
|
|
142
|
+
data_partition_id: str,
|
|
143
|
+
) -> AppError | MultiRecordHeadersInfo | None:
|
|
144
|
+
"""Fetch multiple records' headers by ID
|
|
145
|
+
|
|
146
|
+
The API fetches administrative headers (system-managed fields) for multiple records at once,
|
|
147
|
+
completely omitting the heavy data payload. Allows up to 1000 IDs.
|
|
148
|
+
|
|
149
|
+
Args:
|
|
150
|
+
x_collaboration (str | Unset):
|
|
151
|
+
data_partition_id (str):
|
|
152
|
+
body (MultiRecordHeadersRequest): Record headers query request
|
|
153
|
+
|
|
154
|
+
Raises:
|
|
155
|
+
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
|
|
156
|
+
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
|
157
|
+
|
|
158
|
+
Returns:
|
|
159
|
+
AppError | MultiRecordHeadersInfo
|
|
160
|
+
"""
|
|
161
|
+
|
|
162
|
+
return sync_detailed(
|
|
163
|
+
client=client,
|
|
164
|
+
body=body,
|
|
165
|
+
x_collaboration=x_collaboration,
|
|
166
|
+
data_partition_id=data_partition_id,
|
|
167
|
+
).parsed
|
|
168
|
+
|
|
169
|
+
|
|
170
|
+
async def asyncio_detailed(
|
|
171
|
+
*,
|
|
172
|
+
client: AuthenticatedClient,
|
|
173
|
+
body: MultiRecordHeadersRequest,
|
|
174
|
+
x_collaboration: str | Unset = UNSET,
|
|
175
|
+
data_partition_id: str,
|
|
176
|
+
) -> Response[AppError | MultiRecordHeadersInfo]:
|
|
177
|
+
"""Fetch multiple records' headers by ID
|
|
178
|
+
|
|
179
|
+
The API fetches administrative headers (system-managed fields) for multiple records at once,
|
|
180
|
+
completely omitting the heavy data payload. Allows up to 1000 IDs.
|
|
181
|
+
|
|
182
|
+
Args:
|
|
183
|
+
x_collaboration (str | Unset):
|
|
184
|
+
data_partition_id (str):
|
|
185
|
+
body (MultiRecordHeadersRequest): Record headers query request
|
|
186
|
+
|
|
187
|
+
Raises:
|
|
188
|
+
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
|
|
189
|
+
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
|
190
|
+
|
|
191
|
+
Returns:
|
|
192
|
+
Response[AppError | MultiRecordHeadersInfo]
|
|
193
|
+
"""
|
|
194
|
+
|
|
195
|
+
kwargs = _get_kwargs(
|
|
196
|
+
body=body,
|
|
197
|
+
x_collaboration=x_collaboration,
|
|
198
|
+
data_partition_id=data_partition_id,
|
|
199
|
+
)
|
|
200
|
+
|
|
201
|
+
response = await client.get_async_httpx_client().request(**kwargs)
|
|
202
|
+
|
|
203
|
+
return _build_response(client=client, response=response)
|
|
204
|
+
|
|
205
|
+
|
|
206
|
+
async def asyncio(
|
|
207
|
+
*,
|
|
208
|
+
client: AuthenticatedClient,
|
|
209
|
+
body: MultiRecordHeadersRequest,
|
|
210
|
+
x_collaboration: str | Unset = UNSET,
|
|
211
|
+
data_partition_id: str,
|
|
212
|
+
) -> AppError | MultiRecordHeadersInfo | None:
|
|
213
|
+
"""Fetch multiple records' headers by ID
|
|
214
|
+
|
|
215
|
+
The API fetches administrative headers (system-managed fields) for multiple records at once,
|
|
216
|
+
completely omitting the heavy data payload. Allows up to 1000 IDs.
|
|
217
|
+
|
|
218
|
+
Args:
|
|
219
|
+
x_collaboration (str | Unset):
|
|
220
|
+
data_partition_id (str):
|
|
221
|
+
body (MultiRecordHeadersRequest): Record headers query request
|
|
222
|
+
|
|
223
|
+
Raises:
|
|
224
|
+
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
|
|
225
|
+
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
|
226
|
+
|
|
227
|
+
Returns:
|
|
228
|
+
AppError | MultiRecordHeadersInfo
|
|
229
|
+
"""
|
|
230
|
+
|
|
231
|
+
return (
|
|
232
|
+
await asyncio_detailed(
|
|
233
|
+
client=client,
|
|
234
|
+
body=body,
|
|
235
|
+
x_collaboration=x_collaboration,
|
|
236
|
+
data_partition_id=data_partition_id,
|
|
237
|
+
)
|
|
238
|
+
).parsed
|
|
@@ -32,6 +32,11 @@ from .feature_flag_state import FeatureFlagState
|
|
|
32
32
|
from .get_all_records_sort_order import GetAllRecordsSortOrder
|
|
33
33
|
from .legal import Legal
|
|
34
34
|
from .legal_status import LegalStatus
|
|
35
|
+
from .multi_record_headers_info import MultiRecordHeadersInfo
|
|
36
|
+
from .multi_record_headers_request import MultiRecordHeadersRequest
|
|
37
|
+
from .multi_record_headers_request_attributes_item import (
|
|
38
|
+
MultiRecordHeadersRequestAttributesItem,
|
|
39
|
+
)
|
|
35
40
|
from .multi_record_ids import MultiRecordIds
|
|
36
41
|
from .multi_record_info import MultiRecordInfo
|
|
37
42
|
from .multi_record_request import MultiRecordRequest
|
|
@@ -44,6 +49,8 @@ from .record import Record
|
|
|
44
49
|
from .record_ancestry import RecordAncestry
|
|
45
50
|
from .record_bulk_update_param import RecordBulkUpdateParam
|
|
46
51
|
from .record_data import RecordData
|
|
52
|
+
from .record_headers_dto import RecordHeadersDTO
|
|
53
|
+
from .record_headers_dto_tags import RecordHeadersDTOTags
|
|
47
54
|
from .record_merge_patch_request import RecordMergePatchRequest
|
|
48
55
|
from .record_merge_patch_request_data import RecordMergePatchRequestData
|
|
49
56
|
from .record_merge_patch_request_data_additional_property import (
|
|
@@ -84,6 +91,9 @@ __all__ = (
|
|
|
84
91
|
"GetAllRecordsSortOrder",
|
|
85
92
|
"Legal",
|
|
86
93
|
"LegalStatus",
|
|
94
|
+
"MultiRecordHeadersInfo",
|
|
95
|
+
"MultiRecordHeadersRequest",
|
|
96
|
+
"MultiRecordHeadersRequestAttributesItem",
|
|
87
97
|
"MultiRecordIds",
|
|
88
98
|
"MultiRecordInfo",
|
|
89
99
|
"MultiRecordRequest",
|
|
@@ -96,6 +106,8 @@ __all__ = (
|
|
|
96
106
|
"RecordAncestry",
|
|
97
107
|
"RecordBulkUpdateParam",
|
|
98
108
|
"RecordData",
|
|
109
|
+
"RecordHeadersDTO",
|
|
110
|
+
"RecordHeadersDTOTags",
|
|
99
111
|
"RecordMergePatchRequest",
|
|
100
112
|
"RecordMergePatchRequestData",
|
|
101
113
|
"RecordMergePatchRequestDataAdditionalProperty",
|
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
from __future__ import annotations
|
|
2
|
+
|
|
3
|
+
from collections.abc import Mapping
|
|
4
|
+
from typing import TYPE_CHECKING, Any, TypeVar, cast
|
|
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.record_headers_dto import RecordHeadersDTO
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
T = TypeVar("T", bound="MultiRecordHeadersInfo")
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
@_attrs_define
|
|
19
|
+
class MultiRecordHeadersInfo:
|
|
20
|
+
"""
|
|
21
|
+
Attributes:
|
|
22
|
+
records (list[RecordHeadersDTO] | Unset):
|
|
23
|
+
not_found (list[str] | Unset):
|
|
24
|
+
invalid_records (list[str] | Unset):
|
|
25
|
+
"""
|
|
26
|
+
|
|
27
|
+
records: list[RecordHeadersDTO] | Unset = UNSET
|
|
28
|
+
not_found: list[str] | Unset = UNSET
|
|
29
|
+
invalid_records: list[str] | Unset = UNSET
|
|
30
|
+
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
|
|
31
|
+
|
|
32
|
+
def to_dict(self) -> dict[str, Any]:
|
|
33
|
+
records: list[dict[str, Any]] | Unset = UNSET
|
|
34
|
+
if not isinstance(self.records, Unset):
|
|
35
|
+
records = []
|
|
36
|
+
for records_item_data in self.records:
|
|
37
|
+
records_item = records_item_data.to_dict()
|
|
38
|
+
records.append(records_item)
|
|
39
|
+
|
|
40
|
+
not_found: list[str] | Unset = UNSET
|
|
41
|
+
if not isinstance(self.not_found, Unset):
|
|
42
|
+
not_found = self.not_found
|
|
43
|
+
|
|
44
|
+
invalid_records: list[str] | Unset = UNSET
|
|
45
|
+
if not isinstance(self.invalid_records, Unset):
|
|
46
|
+
invalid_records = self.invalid_records
|
|
47
|
+
|
|
48
|
+
field_dict: dict[str, Any] = {}
|
|
49
|
+
field_dict.update(self.additional_properties)
|
|
50
|
+
field_dict.update({})
|
|
51
|
+
if records is not UNSET:
|
|
52
|
+
field_dict["records"] = records
|
|
53
|
+
if not_found is not UNSET:
|
|
54
|
+
field_dict["notFound"] = not_found
|
|
55
|
+
if invalid_records is not UNSET:
|
|
56
|
+
field_dict["invalidRecords"] = invalid_records
|
|
57
|
+
|
|
58
|
+
return field_dict
|
|
59
|
+
|
|
60
|
+
@classmethod
|
|
61
|
+
def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
|
|
62
|
+
from ..models.record_headers_dto import RecordHeadersDTO
|
|
63
|
+
|
|
64
|
+
d = dict(src_dict)
|
|
65
|
+
_records = d.pop("records", UNSET)
|
|
66
|
+
records: list[RecordHeadersDTO] | Unset = UNSET
|
|
67
|
+
if _records is not UNSET:
|
|
68
|
+
records = []
|
|
69
|
+
for records_item_data in _records:
|
|
70
|
+
records_item = RecordHeadersDTO.from_dict(records_item_data)
|
|
71
|
+
|
|
72
|
+
records.append(records_item)
|
|
73
|
+
|
|
74
|
+
not_found = cast(list[str], d.pop("notFound", UNSET))
|
|
75
|
+
|
|
76
|
+
invalid_records = cast(list[str], d.pop("invalidRecords", UNSET))
|
|
77
|
+
|
|
78
|
+
multi_record_headers_info = cls(
|
|
79
|
+
records=records,
|
|
80
|
+
not_found=not_found,
|
|
81
|
+
invalid_records=invalid_records,
|
|
82
|
+
)
|
|
83
|
+
|
|
84
|
+
multi_record_headers_info.additional_properties = d
|
|
85
|
+
return multi_record_headers_info
|
|
86
|
+
|
|
87
|
+
@property
|
|
88
|
+
def additional_keys(self) -> list[str]:
|
|
89
|
+
return list(self.additional_properties.keys())
|
|
90
|
+
|
|
91
|
+
def __getitem__(self, key: str) -> Any:
|
|
92
|
+
return self.additional_properties[key]
|
|
93
|
+
|
|
94
|
+
def __setitem__(self, key: str, value: Any) -> None:
|
|
95
|
+
self.additional_properties[key] = value
|
|
96
|
+
|
|
97
|
+
def __delitem__(self, key: str) -> None:
|
|
98
|
+
del self.additional_properties[key]
|
|
99
|
+
|
|
100
|
+
def __contains__(self, key: str) -> bool:
|
|
101
|
+
return key in self.additional_properties
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
from __future__ import annotations
|
|
2
|
+
|
|
3
|
+
from collections.abc import Mapping
|
|
4
|
+
from typing import Any, TypeVar, cast
|
|
5
|
+
|
|
6
|
+
from attrs import define as _attrs_define
|
|
7
|
+
from attrs import field as _attrs_field
|
|
8
|
+
|
|
9
|
+
from ..models.multi_record_headers_request_attributes_item import (
|
|
10
|
+
MultiRecordHeadersRequestAttributesItem,
|
|
11
|
+
)
|
|
12
|
+
from ..types import UNSET, Unset
|
|
13
|
+
|
|
14
|
+
T = TypeVar("T", bound="MultiRecordHeadersRequest")
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
@_attrs_define
|
|
18
|
+
class MultiRecordHeadersRequest:
|
|
19
|
+
"""Record headers query request
|
|
20
|
+
|
|
21
|
+
Attributes:
|
|
22
|
+
records (list[str]):
|
|
23
|
+
attributes (list[MultiRecordHeadersRequestAttributesItem] | Unset): Filter/projection: list of record header
|
|
24
|
+
attributes to return. If specified, only these attributes (plus 'id') will be returned. If omitted or empty, all
|
|
25
|
+
record header fields are returned.
|
|
26
|
+
"""
|
|
27
|
+
|
|
28
|
+
records: list[str]
|
|
29
|
+
attributes: list[MultiRecordHeadersRequestAttributesItem] | Unset = UNSET
|
|
30
|
+
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
|
|
31
|
+
|
|
32
|
+
def to_dict(self) -> dict[str, Any]:
|
|
33
|
+
records = self.records
|
|
34
|
+
|
|
35
|
+
attributes: list[str] | Unset = UNSET
|
|
36
|
+
if not isinstance(self.attributes, Unset):
|
|
37
|
+
attributes = []
|
|
38
|
+
for attributes_item_data in self.attributes:
|
|
39
|
+
attributes_item = attributes_item_data.value
|
|
40
|
+
attributes.append(attributes_item)
|
|
41
|
+
|
|
42
|
+
field_dict: dict[str, Any] = {}
|
|
43
|
+
field_dict.update(self.additional_properties)
|
|
44
|
+
field_dict.update(
|
|
45
|
+
{
|
|
46
|
+
"records": records,
|
|
47
|
+
}
|
|
48
|
+
)
|
|
49
|
+
if attributes is not UNSET:
|
|
50
|
+
field_dict["attributes"] = attributes
|
|
51
|
+
|
|
52
|
+
return field_dict
|
|
53
|
+
|
|
54
|
+
@classmethod
|
|
55
|
+
def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
|
|
56
|
+
d = dict(src_dict)
|
|
57
|
+
records = cast(list[str], d.pop("records"))
|
|
58
|
+
|
|
59
|
+
_attributes = d.pop("attributes", UNSET)
|
|
60
|
+
attributes: list[MultiRecordHeadersRequestAttributesItem] | Unset = UNSET
|
|
61
|
+
if _attributes is not UNSET:
|
|
62
|
+
attributes = []
|
|
63
|
+
for attributes_item_data in _attributes:
|
|
64
|
+
attributes_item = MultiRecordHeadersRequestAttributesItem(
|
|
65
|
+
attributes_item_data
|
|
66
|
+
)
|
|
67
|
+
|
|
68
|
+
attributes.append(attributes_item)
|
|
69
|
+
|
|
70
|
+
multi_record_headers_request = cls(
|
|
71
|
+
records=records,
|
|
72
|
+
attributes=attributes,
|
|
73
|
+
)
|
|
74
|
+
|
|
75
|
+
multi_record_headers_request.additional_properties = d
|
|
76
|
+
return multi_record_headers_request
|
|
77
|
+
|
|
78
|
+
@property
|
|
79
|
+
def additional_keys(self) -> list[str]:
|
|
80
|
+
return list(self.additional_properties.keys())
|
|
81
|
+
|
|
82
|
+
def __getitem__(self, key: str) -> Any:
|
|
83
|
+
return self.additional_properties[key]
|
|
84
|
+
|
|
85
|
+
def __setitem__(self, key: str, value: Any) -> None:
|
|
86
|
+
self.additional_properties[key] = value
|
|
87
|
+
|
|
88
|
+
def __delitem__(self, key: str) -> None:
|
|
89
|
+
del self.additional_properties[key]
|
|
90
|
+
|
|
91
|
+
def __contains__(self, key: str) -> bool:
|
|
92
|
+
return key in self.additional_properties
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
from enum import Enum
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
class MultiRecordHeadersRequestAttributesItem(str, Enum):
|
|
5
|
+
ACL = "acl"
|
|
6
|
+
ANCESTRY = "ancestry"
|
|
7
|
+
CREATETIME = "createTime"
|
|
8
|
+
CREATEUSER = "createUser"
|
|
9
|
+
KIND = "kind"
|
|
10
|
+
LEGAL = "legal"
|
|
11
|
+
MODIFYTIME = "modifyTime"
|
|
12
|
+
MODIFYUSER = "modifyUser"
|
|
13
|
+
TAGS = "tags"
|
|
14
|
+
VERSION = "version"
|
|
15
|
+
|
|
16
|
+
def __str__(self) -> str:
|
|
17
|
+
return str(self.value)
|