entryscape 1.3.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.
Files changed (82) hide show
  1. entryscape/__init__.py +219 -0
  2. entryscape/api/__init__.py +26 -0
  3. entryscape/api/app_token_api.py +835 -0
  4. entryscape/api/auth_api.py +965 -0
  5. entryscape/api/catalog_api.py +4473 -0
  6. entryscape/api/contact_api.py +3135 -0
  7. entryscape/api/dataservice_api.py +3135 -0
  8. entryscape/api/dataset_api.py +3804 -0
  9. entryscape/api/distribution_api.py +3135 -0
  10. entryscape/api/document_api.py +2740 -0
  11. entryscape/api/idea_api.py +2740 -0
  12. entryscape/api/job_api.py +360 -0
  13. entryscape/api/model_api.py +2446 -0
  14. entryscape/api/model_class_api.py +2611 -0
  15. entryscape/api/model_diagram_api.py +2611 -0
  16. entryscape/api/model_field_api.py +2611 -0
  17. entryscape/api/model_form_api.py +2611 -0
  18. entryscape/api/model_namespace_api.py +2611 -0
  19. entryscape/api/model_property_api.py +2611 -0
  20. entryscape/api/organization_api.py +3135 -0
  21. entryscape/api/search_api.py +1513 -0
  22. entryscape/api/showcase_api.py +2740 -0
  23. entryscape/api/suggestion_api.py +2740 -0
  24. entryscape/api/terminology_api.py +1726 -0
  25. entryscape/api/upload_api.py +814 -0
  26. entryscape/api_client.py +763 -0
  27. entryscape/api_response.py +20 -0
  28. entryscape/configuration.py +673 -0
  29. entryscape/exceptions.py +222 -0
  30. entryscape/models/__init__.py +71 -0
  31. entryscape/models/app_token.py +156 -0
  32. entryscape/models/app_token_create_request.py +98 -0
  33. entryscape/models/app_token_create_response.py +169 -0
  34. entryscape/models/app_token_status.py +35 -0
  35. entryscape/models/app_token_verify_request.py +109 -0
  36. entryscape/models/entity_list_item.py +175 -0
  37. entryscape/models/entity_list_response.py +139 -0
  38. entryscape/models/entity_reference.py +189 -0
  39. entryscape/models/entity_type.py +57 -0
  40. entryscape/models/error.py +135 -0
  41. entryscape/models/facet_field.py +115 -0
  42. entryscape/models/facet_field_values_inner.py +100 -0
  43. entryscape/models/facet_list.py +113 -0
  44. entryscape/models/facet_list_available_inner.py +107 -0
  45. entryscape/models/job_response.py +112 -0
  46. entryscape/models/job_status.py +189 -0
  47. entryscape/models/job_status_progress.py +100 -0
  48. entryscape/models/job_status_value.py +37 -0
  49. entryscape/models/job_type.py +37 -0
  50. entryscape/models/list_catalogs_entry_type_parameter.py +37 -0
  51. entryscape/models/list_catalogs_graph_type_parameter.py +44 -0
  52. entryscape/models/list_catalogs_resource_type_parameter.py +37 -0
  53. entryscape/models/login_request.py +108 -0
  54. entryscape/models/login_response.py +115 -0
  55. entryscape/models/metadata_format.py +38 -0
  56. entryscape/models/metadata_request.py +99 -0
  57. entryscape/models/parent_reference.py +130 -0
  58. entryscape/models/search_request.py +158 -0
  59. entryscape/models/search_request_filters.py +144 -0
  60. entryscape/models/search_request_filters_graph_type.py +44 -0
  61. entryscape/models/search_request_filters_resource_type.py +37 -0
  62. entryscape/models/search_request_sort.py +38 -0
  63. entryscape/models/search_request_sort_order.py +35 -0
  64. entryscape/models/search_response.py +175 -0
  65. entryscape/models/search_result.py +175 -0
  66. entryscape/models/search_result_graph_type.py +44 -0
  67. entryscape/models/search_result_resource_type.py +37 -0
  68. entryscape/models/search_sort_order_parameter.py +35 -0
  69. entryscape/models/terminology_import_mode.py +35 -0
  70. entryscape/models/validation_profile.py +36 -0
  71. entryscape/models/validation_response.py +149 -0
  72. entryscape/models/validation_result.py +162 -0
  73. entryscape/models/validation_severity.py +36 -0
  74. entryscape/models/validation_summary.py +122 -0
  75. entryscape/models/whoami_response.py +104 -0
  76. entryscape/py.typed +0 -0
  77. entryscape/rest.py +210 -0
  78. entryscape-1.3.0.dist-info/METADATA +696 -0
  79. entryscape-1.3.0.dist-info/RECORD +82 -0
  80. entryscape-1.3.0.dist-info/WHEEL +5 -0
  81. entryscape-1.3.0.dist-info/licenses/LICENSE.txt +165 -0
  82. entryscape-1.3.0.dist-info/top_level.txt +1 -0
@@ -0,0 +1,2740 @@
1
+ """
2
+ EntryScape API
3
+
4
+ This API provides structured access to EntryScape data following DCAT-AP standards. All entity endpoints follow a consistent pattern: - GET /{entity} - List all entities - POST /{entity} - Create a new entity (DCAT types only) - GET /{entity}/{context_id}/{entry_id} - Get entity reference info - DELETE /{entity}/{context_id}/{entry_id} - Delete an entity (DCAT types only) - GET /{entity}/{context_id}/{entry_id}/metadata - Get raw RDF metadata - PUT /{entity}/{context_id}/{entry_id}/metadata - Replace raw RDF metadata (JSON-LD, Turtle, RDF/XML, or N-Triples passthrough) ## Reading and consistency Reads of a single entity — `GET /{entity}/{context_id}/{entry_id}` and its `/metadata` — go straight to the store and always reflect the latest write. Lists and search do not. They are answered from a search index that is updated asynchronously, so for a short interval after a write: - an entry that was just created may be missing from the list it belongs to, while reading it by id already works; - an entry that was just deleted may still appear; - `results` counts what the index holds, not what the store holds. Write a client that tolerates this: after creating an entry, use the id the create returned rather than searching for what you just wrote. `results` is also an upper bound rather than an exact count when the caller cannot read every hit (see the field's own description). Separately, responses are cached for 15 minutes by default, which is a second and unrelated source of staleness. A write invalidates the cache entries it affects, but a read that lands in the indexing gap can cache a list that does not yet show it. ## Authentication Most endpoints require an authenticated session. Reading public data works without authentication, while creating, updating, and deleting entities requires a valid user session. 1. **Log in** with `POST /auth/login`, supplying an EntryStore username and password. The response returns an `auth_token`. 2. **Send the token** on subsequent requests via the `X-Auth-Token` header. This is the recommended method for SDK and programmatic access. Browser clients can instead rely on the `auth_token` cookie, which the server sets automatically on login (`SameSite=Lax; Secure`). 3. **Inspect the session** with `GET /auth/whoami`, which returns the current user or an anonymous/guest identity when no valid token is supplied. 4. **Log out** with `POST /auth/logout` to invalidate the token and clear the cookie. ### Writes and CSRF Send the token as the `X-Auth-Token` **header** and there is nothing else to do: creates, updates and deletes work as they are, which is how the SDKs and the MCP server are built. The `auth_token` cookie is different. A cookie is attached by the browser automatically, so a state-changing request authenticated by it alone is what cross-site request forgery abuses, and those requests additionally need a double-submit token: read the `XSRF-TOKEN` cookie the server sets on any response and send its value back as the `X-XSRF-TOKEN` header. Without it the request is rejected with `403` before it reaches the endpoint. A custom header cannot be forged this way — cross-origin JavaScript cannot set one without a CORS preflight, which this API grants only to configured origins — so the header is the recommended path for anything that is not a browser session. ### App Tokens An app token identifies an integration. Create one with `POST /app-token` (unauthenticated). Creation requires an email address: the token starts in the `pending` state and a 6-digit code is emailed to the owner. Confirm the code with `POST /app-token/verify` to activate the token and receive its value, which is shown only once — store it securely. `GET /app-token/{app_token_id}` then returns its details and quota usage, authenticated by the token itself via the `X-App-Token` header. **The `X-App-Token` header is accepted only by `GET /app-token/{app_token_id}`.** No other operation reads it, and the read quota is recorded but not yet enforced: reading public data needs no token of any kind, and sending an app token with a read neither grants nor meters anything. Metered public read access is the intent of the two-token model, not a description of this release — see the `security` declared on each operation for what it actually accepts. ## SDKs Generated clients for Python, TypeScript, JavaScript and C# wrap every operation below, and each operation on this page shows the SDK call beside the `curl` command. Two of them install from a public registry: ``` pip install entryscape # Python npm install @entryscape/api-client # TypeScript and JavaScript ``` `@entryscape/api-client` ships an ESM and a CommonJS build, so `import` and `require()` both work and TypeScript is not required to use it — the name describes what it is written in, not what you have to write. There is a separate generated JavaScript SDK, and it is deliberately **not** on npm; this package is the npm client for both languages. Every SDK, including the C# and JavaScript ones, is also published as a tarball. The downloads are linked in the sidebar, they are the route to take when a registry is unreachable or a build has to vendor its dependencies, and each archive carries the SDK's own README: - **Python** — `pip install entryscape`, or `python-sdk.tar.gz`. - **TypeScript and JavaScript** — `npm install @entryscape/api-client`, or `typescript-sdk.tar.gz`. - **JavaScript (the separate generated client)** — not published to a registry, by design; `javascript-sdk.tar.gz` only. - **C#** — not published to NuGet yet; `csharp-sdk.tar.gz` only. - **MCP server** — `npx -y @entryscape/mcp-server`, or `mcp-server.tar.gz`. ## MCP Server A Model Context Protocol (MCP) server is generated from this specification and published alongside the SDKs (`@entryscape/mcp-server`), exposing the API as tools for AI assistants and agents. Each operation becomes one tool named after its `operationId` — `listDatasets`, `createCatalog`, `search`, `getJobStatus`. The `auth` operations are the exception: the server reads its token once at startup, so a `login` tool could install nothing and a `logout` tool would only invalidate the token the server was started with. On connect the server also hands the assistant a short set of rules that hold across every tool: a token is bound to one EntryStore instance, the search index lags a write, uploads finish as jobs. ### Install The server is on npm, and MCP servers are normally launched straight from there, so nothing has to be installed first: ``` npx -y @entryscape/mcp-server ``` `npm install -g @entryscape/mcp-server` works too and puts an `entryscape-mcp` binary on `PATH`. It is also listed in the MCP Registry as `com.entryscape/mcp-server`, which is where clients and marketplaces look it up. Without npm, download `mcp-server.tar.gz` from the SDK downloads and unpack it. The package ships prebuilt; install its runtime dependency once: ``` mkdir entryscape-mcp && tar -xzf mcp-server.tar.gz -C entryscape-mcp cd entryscape-mcp && npm install --omit=dev ``` ### Configure The server is a stdio MCP server configured through environment variables, read once at startup: - `ENTRYSCAPE_API_URL` — base URL of the API server, path included. Required: there is no default, and the server refuses to start without it. - `ENTRYSCAPE_AUTH_TOKEN` — a session token from `POST /auth/login`, sent as the `X-Auth-Token` header. Optional: without it reads see public entries and every write is refused. A token is valid only for the EntryStore instance that issued it. - `ENTRYSCAPE_ENTRYSTORE_HOST` — the EntryStore instance the API server should use, for example `dev.entryscape.com/store/`. Unset means the API server's own default. - `ENTRYSCAPE_MCP_UPLOAD_ROOT` — the directory the upload tools may read files from. **Unset means uploads are disabled**: `addFileToDistribution`, `replaceFileInDistribution` and `importTerminology` refuse and say so. - `ENTRYSCAPE_MCP_TAGS` — comma-separated tags to serve tools for, for example `catalog,dataset,distribution,search`. Unset serves every tool. The package's `README.md` lists the remaining variables (timeouts and size caps). Register the server with any MCP-capable client by adding it to the client's `mcpServers` configuration: ```json { \"mcpServers\": { \"entryscape\": { \"command\": \"npx\", \"args\": [\"-y\", \"@entryscape/mcp-server\"], \"env\": { \"ENTRYSCAPE_API_URL\": \"https://<your EntryScape API host>\", \"ENTRYSCAPE_AUTH_TOKEN\": \"your-session-token\" } } } } ``` From an unpacked download instead, the command is `\"command\": \"node\", \"args\": [\"/path/to/entryscape-mcp/dist/bin/entryscape-mcp.js\"]`. ### Claude Code The unpacked package is also a Claude Code plugin, so one install gives the server and the skills below together. Claude Code installs plugins from marketplaces, and the package carries a one-entry marketplace pointing at itself: ``` claude plugin marketplace add /path/to/entryscape-mcp claude plugin install entryscape@entryscape --scope user ``` The plugin passes `ENTRYSCAPE_API_URL`, `ENTRYSCAPE_AUTH_TOKEN`, `ENTRYSCAPE_ENTRYSTORE_HOST`, `ENTRYSCAPE_MCP_TAGS` and `ENTRYSCAPE_MCP_UPLOAD_ROOT` through from the shell Claude Code was started in, so set them there. To try the plugin for one session without installing it, start Claude Code with `--plugin-dir /path/to/entryscape-mcp`. ### Skills `skills/` in the package holds procedures that span several tools, in the Agent Skills format (a `SKILL.md` with `name` and `description`): which tools to call in which order, what to check between calls, and where to stop. Claude Code loads them from the plugin; other clients that read the format can be pointed at the directory. The `find` skill covers discovery, facets and selective metadata reads; `publish-dataset` takes a dataset from catalog to validated distribution with its file; `edit-metadata` changes an entry that already exists without dropping the rest of its graph, models included; `migrate-from-taskrunner` moves an integration off the deprecated Taskrunner API. Every tool a skill names is checked against this specification when the package is built. ## Deprecation Policy When endpoints or features are deprecated: 1. The operation is marked with `deprecated: true` in this spec 2. The operation description documents the replacement endpoint and sunset date 3. Deprecated endpoints remain functional for at least 6 months after announcement 4. The server returns a `Sunset` header with the planned removal date 5. After the sunset date, the endpoint may be removed in a future release
5
+
6
+ The version of the OpenAPI document: 1.3.0
7
+ Contact: contact@entryscape.com
8
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
9
+
10
+ Do not edit the class manually.
11
+ """ # noqa: E501
12
+
13
+ import warnings
14
+ from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt
15
+ from typing import Any, Dict, List, Optional, Tuple, Union
16
+ from typing_extensions import Annotated
17
+
18
+ from datetime import datetime
19
+ from pydantic import Field, StrictBool, StrictStr, field_validator
20
+ from typing import Any, Dict, Optional
21
+ from typing_extensions import Annotated
22
+ from entryscape.models.entity_list_response import EntityListResponse
23
+ from entryscape.models.entity_reference import EntityReference
24
+ from entryscape.models.list_catalogs_entry_type_parameter import (
25
+ ListCatalogsEntryTypeParameter,
26
+ )
27
+ from entryscape.models.list_catalogs_graph_type_parameter import (
28
+ ListCatalogsGraphTypeParameter,
29
+ )
30
+ from entryscape.models.list_catalogs_resource_type_parameter import (
31
+ ListCatalogsResourceTypeParameter,
32
+ )
33
+ from entryscape.models.metadata_format import MetadataFormat
34
+ from entryscape.models.metadata_request import MetadataRequest
35
+
36
+ from entryscape.api_client import ApiClient, RequestSerialized
37
+ from entryscape.api_response import ApiResponse
38
+ from entryscape.rest import RESTResponseType
39
+
40
+
41
+ class SuggestionApi:
42
+ """NOTE: This class is auto generated by OpenAPI Generator
43
+ Ref: https://openapi-generator.tech
44
+
45
+ Do not edit the class manually.
46
+ """
47
+
48
+ def __init__(self, api_client=None) -> None:
49
+ if api_client is None:
50
+ api_client = ApiClient.get_default()
51
+ self.api_client = api_client
52
+
53
+ @validate_call
54
+ async def create_suggestion(
55
+ self,
56
+ context: Annotated[
57
+ str,
58
+ Field(
59
+ strict=True,
60
+ description="The context (catalog) ID where the new entity will be created",
61
+ ),
62
+ ],
63
+ metadata_request: Annotated[
64
+ MetadataRequest,
65
+ Field(
66
+ description="With Content-Type application/ld+json the structured MetadataRequest schema applies. Raw RDF is also accepted and forwarded verbatim to EntryStore when the Content-Type is text/turtle, application/rdf+xml, application/n-triples, or application/rdf+json (see the endpoint description). "
67
+ ),
68
+ ],
69
+ x_entrystore_host: Annotated[
70
+ Optional[StrictStr],
71
+ Field(
72
+ description="Target EntryStore instance (alternative to the entrystore_host query parameter, which wins if both are sent). The value has to be an instance this deployment has been configured to allow; any other host is refused with 400. Omit it for the deployment's default instance. "
73
+ ),
74
+ ] = None,
75
+ entrystore_host: Annotated[
76
+ Optional[StrictStr],
77
+ Field(
78
+ description="Target EntryStore instance. Overrides the X-Entrystore-Host header if both are provided. The value has to be an instance this deployment has been configured to allow; any other host is refused with 400, so a target you cannot reach is a request to the deployment's operator, not a different value to try. Omit it for the deployment's default instance. "
79
+ ),
80
+ ] = None,
81
+ _request_timeout: Union[
82
+ None,
83
+ Annotated[StrictFloat, Field(gt=0)],
84
+ Tuple[
85
+ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
86
+ ],
87
+ ] = None,
88
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
89
+ _content_type: Optional[StrictStr] = None,
90
+ _headers: Optional[Dict[StrictStr, Any]] = None,
91
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
92
+ ) -> EntityReference:
93
+ """Create suggestion
94
+
95
+ Creates a new suggestion in the specified context. The request body must contain valid metadata in JSON-LD format. Requires authentication with write access to the target context.
96
+
97
+ :param context: The context (catalog) ID where the new entity will be created (required)
98
+ :type context: str
99
+ :param metadata_request: With Content-Type application/ld+json the structured MetadataRequest schema applies. Raw RDF is also accepted and forwarded verbatim to EntryStore when the Content-Type is text/turtle, application/rdf+xml, application/n-triples, or application/rdf+json (see the endpoint description). (required)
100
+ :type metadata_request: MetadataRequest
101
+ :param x_entrystore_host: Target EntryStore instance (alternative to the entrystore_host query parameter, which wins if both are sent). The value has to be an instance this deployment has been configured to allow; any other host is refused with 400. Omit it for the deployment's default instance.
102
+ :type x_entrystore_host: str
103
+ :param entrystore_host: Target EntryStore instance. Overrides the X-Entrystore-Host header if both are provided. The value has to be an instance this deployment has been configured to allow; any other host is refused with 400, so a target you cannot reach is a request to the deployment's operator, not a different value to try. Omit it for the deployment's default instance.
104
+ :type entrystore_host: str
105
+ :param _request_timeout: timeout setting for this request. If one
106
+ number provided, it will be total request
107
+ timeout. It can also be a pair (tuple) of
108
+ (connection, read) timeouts.
109
+ :type _request_timeout: int, tuple(int, int), optional
110
+ :param _request_auth: set to override the auth_settings for an a single
111
+ request; this effectively ignores the
112
+ authentication in the spec for a single request.
113
+ :type _request_auth: dict, optional
114
+ :param _content_type: force content-type for the request.
115
+ :type _content_type: str, Optional
116
+ :param _headers: set to override the headers for a single
117
+ request; this effectively ignores the headers
118
+ in the spec for a single request.
119
+ :type _headers: dict, optional
120
+ :param _host_index: set to override the host_index for a single
121
+ request; this effectively ignores the host_index
122
+ in the spec for a single request.
123
+ :type _host_index: int, optional
124
+ :return: Returns the result object.
125
+ """ # noqa: E501
126
+
127
+ _param = self._create_suggestion_serialize(
128
+ context=context,
129
+ metadata_request=metadata_request,
130
+ x_entrystore_host=x_entrystore_host,
131
+ entrystore_host=entrystore_host,
132
+ _request_auth=_request_auth,
133
+ _content_type=_content_type,
134
+ _headers=_headers,
135
+ _host_index=_host_index,
136
+ )
137
+
138
+ _response_types_map: Dict[str, Optional[str]] = {
139
+ "201": "EntityReference",
140
+ "400": "Error",
141
+ "401": "Error",
142
+ "403": "Error",
143
+ "404": "Error",
144
+ "409": "Error",
145
+ "422": "ValidationResponse",
146
+ "500": "Error",
147
+ "503": "Error",
148
+ }
149
+ response_data = await self.api_client.call_api(
150
+ *_param, _request_timeout=_request_timeout
151
+ )
152
+ await response_data.read()
153
+ return self.api_client.response_deserialize(
154
+ response_data=response_data,
155
+ response_types_map=_response_types_map,
156
+ ).data
157
+
158
+ @validate_call
159
+ async def create_suggestion_with_http_info(
160
+ self,
161
+ context: Annotated[
162
+ str,
163
+ Field(
164
+ strict=True,
165
+ description="The context (catalog) ID where the new entity will be created",
166
+ ),
167
+ ],
168
+ metadata_request: Annotated[
169
+ MetadataRequest,
170
+ Field(
171
+ description="With Content-Type application/ld+json the structured MetadataRequest schema applies. Raw RDF is also accepted and forwarded verbatim to EntryStore when the Content-Type is text/turtle, application/rdf+xml, application/n-triples, or application/rdf+json (see the endpoint description). "
172
+ ),
173
+ ],
174
+ x_entrystore_host: Annotated[
175
+ Optional[StrictStr],
176
+ Field(
177
+ description="Target EntryStore instance (alternative to the entrystore_host query parameter, which wins if both are sent). The value has to be an instance this deployment has been configured to allow; any other host is refused with 400. Omit it for the deployment's default instance. "
178
+ ),
179
+ ] = None,
180
+ entrystore_host: Annotated[
181
+ Optional[StrictStr],
182
+ Field(
183
+ description="Target EntryStore instance. Overrides the X-Entrystore-Host header if both are provided. The value has to be an instance this deployment has been configured to allow; any other host is refused with 400, so a target you cannot reach is a request to the deployment's operator, not a different value to try. Omit it for the deployment's default instance. "
184
+ ),
185
+ ] = None,
186
+ _request_timeout: Union[
187
+ None,
188
+ Annotated[StrictFloat, Field(gt=0)],
189
+ Tuple[
190
+ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
191
+ ],
192
+ ] = None,
193
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
194
+ _content_type: Optional[StrictStr] = None,
195
+ _headers: Optional[Dict[StrictStr, Any]] = None,
196
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
197
+ ) -> ApiResponse[EntityReference]:
198
+ """Create suggestion
199
+
200
+ Creates a new suggestion in the specified context. The request body must contain valid metadata in JSON-LD format. Requires authentication with write access to the target context.
201
+
202
+ :param context: The context (catalog) ID where the new entity will be created (required)
203
+ :type context: str
204
+ :param metadata_request: With Content-Type application/ld+json the structured MetadataRequest schema applies. Raw RDF is also accepted and forwarded verbatim to EntryStore when the Content-Type is text/turtle, application/rdf+xml, application/n-triples, or application/rdf+json (see the endpoint description). (required)
205
+ :type metadata_request: MetadataRequest
206
+ :param x_entrystore_host: Target EntryStore instance (alternative to the entrystore_host query parameter, which wins if both are sent). The value has to be an instance this deployment has been configured to allow; any other host is refused with 400. Omit it for the deployment's default instance.
207
+ :type x_entrystore_host: str
208
+ :param entrystore_host: Target EntryStore instance. Overrides the X-Entrystore-Host header if both are provided. The value has to be an instance this deployment has been configured to allow; any other host is refused with 400, so a target you cannot reach is a request to the deployment's operator, not a different value to try. Omit it for the deployment's default instance.
209
+ :type entrystore_host: str
210
+ :param _request_timeout: timeout setting for this request. If one
211
+ number provided, it will be total request
212
+ timeout. It can also be a pair (tuple) of
213
+ (connection, read) timeouts.
214
+ :type _request_timeout: int, tuple(int, int), optional
215
+ :param _request_auth: set to override the auth_settings for an a single
216
+ request; this effectively ignores the
217
+ authentication in the spec for a single request.
218
+ :type _request_auth: dict, optional
219
+ :param _content_type: force content-type for the request.
220
+ :type _content_type: str, Optional
221
+ :param _headers: set to override the headers for a single
222
+ request; this effectively ignores the headers
223
+ in the spec for a single request.
224
+ :type _headers: dict, optional
225
+ :param _host_index: set to override the host_index for a single
226
+ request; this effectively ignores the host_index
227
+ in the spec for a single request.
228
+ :type _host_index: int, optional
229
+ :return: Returns the result object.
230
+ """ # noqa: E501
231
+
232
+ _param = self._create_suggestion_serialize(
233
+ context=context,
234
+ metadata_request=metadata_request,
235
+ x_entrystore_host=x_entrystore_host,
236
+ entrystore_host=entrystore_host,
237
+ _request_auth=_request_auth,
238
+ _content_type=_content_type,
239
+ _headers=_headers,
240
+ _host_index=_host_index,
241
+ )
242
+
243
+ _response_types_map: Dict[str, Optional[str]] = {
244
+ "201": "EntityReference",
245
+ "400": "Error",
246
+ "401": "Error",
247
+ "403": "Error",
248
+ "404": "Error",
249
+ "409": "Error",
250
+ "422": "ValidationResponse",
251
+ "500": "Error",
252
+ "503": "Error",
253
+ }
254
+ response_data = await self.api_client.call_api(
255
+ *_param, _request_timeout=_request_timeout
256
+ )
257
+ await response_data.read()
258
+ return self.api_client.response_deserialize(
259
+ response_data=response_data,
260
+ response_types_map=_response_types_map,
261
+ )
262
+
263
+ @validate_call
264
+ async def create_suggestion_without_preload_content(
265
+ self,
266
+ context: Annotated[
267
+ str,
268
+ Field(
269
+ strict=True,
270
+ description="The context (catalog) ID where the new entity will be created",
271
+ ),
272
+ ],
273
+ metadata_request: Annotated[
274
+ MetadataRequest,
275
+ Field(
276
+ description="With Content-Type application/ld+json the structured MetadataRequest schema applies. Raw RDF is also accepted and forwarded verbatim to EntryStore when the Content-Type is text/turtle, application/rdf+xml, application/n-triples, or application/rdf+json (see the endpoint description). "
277
+ ),
278
+ ],
279
+ x_entrystore_host: Annotated[
280
+ Optional[StrictStr],
281
+ Field(
282
+ description="Target EntryStore instance (alternative to the entrystore_host query parameter, which wins if both are sent). The value has to be an instance this deployment has been configured to allow; any other host is refused with 400. Omit it for the deployment's default instance. "
283
+ ),
284
+ ] = None,
285
+ entrystore_host: Annotated[
286
+ Optional[StrictStr],
287
+ Field(
288
+ description="Target EntryStore instance. Overrides the X-Entrystore-Host header if both are provided. The value has to be an instance this deployment has been configured to allow; any other host is refused with 400, so a target you cannot reach is a request to the deployment's operator, not a different value to try. Omit it for the deployment's default instance. "
289
+ ),
290
+ ] = None,
291
+ _request_timeout: Union[
292
+ None,
293
+ Annotated[StrictFloat, Field(gt=0)],
294
+ Tuple[
295
+ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
296
+ ],
297
+ ] = None,
298
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
299
+ _content_type: Optional[StrictStr] = None,
300
+ _headers: Optional[Dict[StrictStr, Any]] = None,
301
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
302
+ ) -> RESTResponseType:
303
+ """Create suggestion
304
+
305
+ Creates a new suggestion in the specified context. The request body must contain valid metadata in JSON-LD format. Requires authentication with write access to the target context.
306
+
307
+ :param context: The context (catalog) ID where the new entity will be created (required)
308
+ :type context: str
309
+ :param metadata_request: With Content-Type application/ld+json the structured MetadataRequest schema applies. Raw RDF is also accepted and forwarded verbatim to EntryStore when the Content-Type is text/turtle, application/rdf+xml, application/n-triples, or application/rdf+json (see the endpoint description). (required)
310
+ :type metadata_request: MetadataRequest
311
+ :param x_entrystore_host: Target EntryStore instance (alternative to the entrystore_host query parameter, which wins if both are sent). The value has to be an instance this deployment has been configured to allow; any other host is refused with 400. Omit it for the deployment's default instance.
312
+ :type x_entrystore_host: str
313
+ :param entrystore_host: Target EntryStore instance. Overrides the X-Entrystore-Host header if both are provided. The value has to be an instance this deployment has been configured to allow; any other host is refused with 400, so a target you cannot reach is a request to the deployment's operator, not a different value to try. Omit it for the deployment's default instance.
314
+ :type entrystore_host: str
315
+ :param _request_timeout: timeout setting for this request. If one
316
+ number provided, it will be total request
317
+ timeout. It can also be a pair (tuple) of
318
+ (connection, read) timeouts.
319
+ :type _request_timeout: int, tuple(int, int), optional
320
+ :param _request_auth: set to override the auth_settings for an a single
321
+ request; this effectively ignores the
322
+ authentication in the spec for a single request.
323
+ :type _request_auth: dict, optional
324
+ :param _content_type: force content-type for the request.
325
+ :type _content_type: str, Optional
326
+ :param _headers: set to override the headers for a single
327
+ request; this effectively ignores the headers
328
+ in the spec for a single request.
329
+ :type _headers: dict, optional
330
+ :param _host_index: set to override the host_index for a single
331
+ request; this effectively ignores the host_index
332
+ in the spec for a single request.
333
+ :type _host_index: int, optional
334
+ :return: Returns the result object.
335
+ """ # noqa: E501
336
+
337
+ _param = self._create_suggestion_serialize(
338
+ context=context,
339
+ metadata_request=metadata_request,
340
+ x_entrystore_host=x_entrystore_host,
341
+ entrystore_host=entrystore_host,
342
+ _request_auth=_request_auth,
343
+ _content_type=_content_type,
344
+ _headers=_headers,
345
+ _host_index=_host_index,
346
+ )
347
+
348
+ _response_types_map: Dict[str, Optional[str]] = {
349
+ "201": "EntityReference",
350
+ "400": "Error",
351
+ "401": "Error",
352
+ "403": "Error",
353
+ "404": "Error",
354
+ "409": "Error",
355
+ "422": "ValidationResponse",
356
+ "500": "Error",
357
+ "503": "Error",
358
+ }
359
+ response_data = await self.api_client.call_api(
360
+ *_param, _request_timeout=_request_timeout
361
+ )
362
+ return response_data.response
363
+
364
+ def _create_suggestion_serialize(
365
+ self,
366
+ context,
367
+ metadata_request,
368
+ x_entrystore_host,
369
+ entrystore_host,
370
+ _request_auth,
371
+ _content_type,
372
+ _headers,
373
+ _host_index,
374
+ ) -> RequestSerialized:
375
+
376
+ _host = None
377
+
378
+ _collection_formats: Dict[str, str] = {}
379
+
380
+ _path_params: Dict[str, str] = {}
381
+ _query_params: List[Tuple[str, str]] = []
382
+ _header_params: Dict[str, Optional[str]] = _headers or {}
383
+ _form_params: List[Tuple[str, str]] = []
384
+ _files: Dict[
385
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
386
+ ] = {}
387
+ _body_params: Optional[bytes] = None
388
+
389
+ # process the path parameters
390
+ # process the query parameters
391
+ if entrystore_host is not None:
392
+
393
+ _query_params.append(("entrystore_host", entrystore_host))
394
+
395
+ if context is not None:
396
+
397
+ _query_params.append(("context", context))
398
+
399
+ # process the header parameters
400
+ if x_entrystore_host is not None:
401
+ _header_params["X-Entrystore-Host"] = x_entrystore_host
402
+ # process the form parameters
403
+ # process the body parameter
404
+ if metadata_request is not None:
405
+ _body_params = metadata_request
406
+
407
+ # set the HTTP header `Accept`
408
+ if "Accept" not in _header_params:
409
+ _header_params["Accept"] = self.api_client.select_header_accept(
410
+ ["application/json"]
411
+ )
412
+
413
+ # set the HTTP header `Content-Type`
414
+ if _content_type:
415
+ _header_params["Content-Type"] = _content_type
416
+ else:
417
+ _default_content_type = self.api_client.select_header_content_type(
418
+ ["application/ld+json"]
419
+ )
420
+ if _default_content_type is not None:
421
+ _header_params["Content-Type"] = _default_content_type
422
+
423
+ # authentication setting
424
+ _auth_settings: List[str] = ["auth_token", "auth_header"]
425
+
426
+ return self.api_client.param_serialize(
427
+ method="POST",
428
+ resource_path="/suggestion",
429
+ path_params=_path_params,
430
+ query_params=_query_params,
431
+ header_params=_header_params,
432
+ body=_body_params,
433
+ post_params=_form_params,
434
+ files=_files,
435
+ auth_settings=_auth_settings,
436
+ collection_formats=_collection_formats,
437
+ _host=_host,
438
+ _request_auth=_request_auth,
439
+ )
440
+
441
+ @validate_call
442
+ async def delete_suggestion(
443
+ self,
444
+ context_id: Annotated[
445
+ str,
446
+ Field(
447
+ strict=True,
448
+ description="The context (catalog) identifier in EntryStore",
449
+ ),
450
+ ],
451
+ entry_id: Annotated[
452
+ str,
453
+ Field(strict=True, description="The entry identifier within the context"),
454
+ ],
455
+ x_entrystore_host: Annotated[
456
+ Optional[StrictStr],
457
+ Field(
458
+ description="Target EntryStore instance (alternative to the entrystore_host query parameter, which wins if both are sent). The value has to be an instance this deployment has been configured to allow; any other host is refused with 400. Omit it for the deployment's default instance. "
459
+ ),
460
+ ] = None,
461
+ entrystore_host: Annotated[
462
+ Optional[StrictStr],
463
+ Field(
464
+ description="Target EntryStore instance. Overrides the X-Entrystore-Host header if both are provided. The value has to be an instance this deployment has been configured to allow; any other host is refused with 400, so a target you cannot reach is a request to the deployment's operator, not a different value to try. Omit it for the deployment's default instance. "
465
+ ),
466
+ ] = None,
467
+ _request_timeout: Union[
468
+ None,
469
+ Annotated[StrictFloat, Field(gt=0)],
470
+ Tuple[
471
+ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
472
+ ],
473
+ ] = None,
474
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
475
+ _content_type: Optional[StrictStr] = None,
476
+ _headers: Optional[Dict[StrictStr, Any]] = None,
477
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
478
+ ) -> None:
479
+ """Delete suggestion
480
+
481
+ Deletes a specific suggestion and its associated metadata. This operation is irreversible. Requires authentication with write access to the entry's context.
482
+
483
+ :param context_id: The context (catalog) identifier in EntryStore (required)
484
+ :type context_id: str
485
+ :param entry_id: The entry identifier within the context (required)
486
+ :type entry_id: str
487
+ :param x_entrystore_host: Target EntryStore instance (alternative to the entrystore_host query parameter, which wins if both are sent). The value has to be an instance this deployment has been configured to allow; any other host is refused with 400. Omit it for the deployment's default instance.
488
+ :type x_entrystore_host: str
489
+ :param entrystore_host: Target EntryStore instance. Overrides the X-Entrystore-Host header if both are provided. The value has to be an instance this deployment has been configured to allow; any other host is refused with 400, so a target you cannot reach is a request to the deployment's operator, not a different value to try. Omit it for the deployment's default instance.
490
+ :type entrystore_host: str
491
+ :param _request_timeout: timeout setting for this request. If one
492
+ number provided, it will be total request
493
+ timeout. It can also be a pair (tuple) of
494
+ (connection, read) timeouts.
495
+ :type _request_timeout: int, tuple(int, int), optional
496
+ :param _request_auth: set to override the auth_settings for an a single
497
+ request; this effectively ignores the
498
+ authentication in the spec for a single request.
499
+ :type _request_auth: dict, optional
500
+ :param _content_type: force content-type for the request.
501
+ :type _content_type: str, Optional
502
+ :param _headers: set to override the headers for a single
503
+ request; this effectively ignores the headers
504
+ in the spec for a single request.
505
+ :type _headers: dict, optional
506
+ :param _host_index: set to override the host_index for a single
507
+ request; this effectively ignores the host_index
508
+ in the spec for a single request.
509
+ :type _host_index: int, optional
510
+ :return: Returns the result object.
511
+ """ # noqa: E501
512
+
513
+ _param = self._delete_suggestion_serialize(
514
+ context_id=context_id,
515
+ entry_id=entry_id,
516
+ x_entrystore_host=x_entrystore_host,
517
+ entrystore_host=entrystore_host,
518
+ _request_auth=_request_auth,
519
+ _content_type=_content_type,
520
+ _headers=_headers,
521
+ _host_index=_host_index,
522
+ )
523
+
524
+ _response_types_map: Dict[str, Optional[str]] = {
525
+ "204": None,
526
+ "400": "Error",
527
+ "401": "Error",
528
+ "403": "Error",
529
+ "404": "Error",
530
+ "409": "Error",
531
+ "500": "Error",
532
+ "503": "Error",
533
+ }
534
+ response_data = await self.api_client.call_api(
535
+ *_param, _request_timeout=_request_timeout
536
+ )
537
+ await response_data.read()
538
+ return self.api_client.response_deserialize(
539
+ response_data=response_data,
540
+ response_types_map=_response_types_map,
541
+ ).data
542
+
543
+ @validate_call
544
+ async def delete_suggestion_with_http_info(
545
+ self,
546
+ context_id: Annotated[
547
+ str,
548
+ Field(
549
+ strict=True,
550
+ description="The context (catalog) identifier in EntryStore",
551
+ ),
552
+ ],
553
+ entry_id: Annotated[
554
+ str,
555
+ Field(strict=True, description="The entry identifier within the context"),
556
+ ],
557
+ x_entrystore_host: Annotated[
558
+ Optional[StrictStr],
559
+ Field(
560
+ description="Target EntryStore instance (alternative to the entrystore_host query parameter, which wins if both are sent). The value has to be an instance this deployment has been configured to allow; any other host is refused with 400. Omit it for the deployment's default instance. "
561
+ ),
562
+ ] = None,
563
+ entrystore_host: Annotated[
564
+ Optional[StrictStr],
565
+ Field(
566
+ description="Target EntryStore instance. Overrides the X-Entrystore-Host header if both are provided. The value has to be an instance this deployment has been configured to allow; any other host is refused with 400, so a target you cannot reach is a request to the deployment's operator, not a different value to try. Omit it for the deployment's default instance. "
567
+ ),
568
+ ] = None,
569
+ _request_timeout: Union[
570
+ None,
571
+ Annotated[StrictFloat, Field(gt=0)],
572
+ Tuple[
573
+ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
574
+ ],
575
+ ] = None,
576
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
577
+ _content_type: Optional[StrictStr] = None,
578
+ _headers: Optional[Dict[StrictStr, Any]] = None,
579
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
580
+ ) -> ApiResponse[None]:
581
+ """Delete suggestion
582
+
583
+ Deletes a specific suggestion and its associated metadata. This operation is irreversible. Requires authentication with write access to the entry's context.
584
+
585
+ :param context_id: The context (catalog) identifier in EntryStore (required)
586
+ :type context_id: str
587
+ :param entry_id: The entry identifier within the context (required)
588
+ :type entry_id: str
589
+ :param x_entrystore_host: Target EntryStore instance (alternative to the entrystore_host query parameter, which wins if both are sent). The value has to be an instance this deployment has been configured to allow; any other host is refused with 400. Omit it for the deployment's default instance.
590
+ :type x_entrystore_host: str
591
+ :param entrystore_host: Target EntryStore instance. Overrides the X-Entrystore-Host header if both are provided. The value has to be an instance this deployment has been configured to allow; any other host is refused with 400, so a target you cannot reach is a request to the deployment's operator, not a different value to try. Omit it for the deployment's default instance.
592
+ :type entrystore_host: str
593
+ :param _request_timeout: timeout setting for this request. If one
594
+ number provided, it will be total request
595
+ timeout. It can also be a pair (tuple) of
596
+ (connection, read) timeouts.
597
+ :type _request_timeout: int, tuple(int, int), optional
598
+ :param _request_auth: set to override the auth_settings for an a single
599
+ request; this effectively ignores the
600
+ authentication in the spec for a single request.
601
+ :type _request_auth: dict, optional
602
+ :param _content_type: force content-type for the request.
603
+ :type _content_type: str, Optional
604
+ :param _headers: set to override the headers for a single
605
+ request; this effectively ignores the headers
606
+ in the spec for a single request.
607
+ :type _headers: dict, optional
608
+ :param _host_index: set to override the host_index for a single
609
+ request; this effectively ignores the host_index
610
+ in the spec for a single request.
611
+ :type _host_index: int, optional
612
+ :return: Returns the result object.
613
+ """ # noqa: E501
614
+
615
+ _param = self._delete_suggestion_serialize(
616
+ context_id=context_id,
617
+ entry_id=entry_id,
618
+ x_entrystore_host=x_entrystore_host,
619
+ entrystore_host=entrystore_host,
620
+ _request_auth=_request_auth,
621
+ _content_type=_content_type,
622
+ _headers=_headers,
623
+ _host_index=_host_index,
624
+ )
625
+
626
+ _response_types_map: Dict[str, Optional[str]] = {
627
+ "204": None,
628
+ "400": "Error",
629
+ "401": "Error",
630
+ "403": "Error",
631
+ "404": "Error",
632
+ "409": "Error",
633
+ "500": "Error",
634
+ "503": "Error",
635
+ }
636
+ response_data = await self.api_client.call_api(
637
+ *_param, _request_timeout=_request_timeout
638
+ )
639
+ await response_data.read()
640
+ return self.api_client.response_deserialize(
641
+ response_data=response_data,
642
+ response_types_map=_response_types_map,
643
+ )
644
+
645
+ @validate_call
646
+ async def delete_suggestion_without_preload_content(
647
+ self,
648
+ context_id: Annotated[
649
+ str,
650
+ Field(
651
+ strict=True,
652
+ description="The context (catalog) identifier in EntryStore",
653
+ ),
654
+ ],
655
+ entry_id: Annotated[
656
+ str,
657
+ Field(strict=True, description="The entry identifier within the context"),
658
+ ],
659
+ x_entrystore_host: Annotated[
660
+ Optional[StrictStr],
661
+ Field(
662
+ description="Target EntryStore instance (alternative to the entrystore_host query parameter, which wins if both are sent). The value has to be an instance this deployment has been configured to allow; any other host is refused with 400. Omit it for the deployment's default instance. "
663
+ ),
664
+ ] = None,
665
+ entrystore_host: Annotated[
666
+ Optional[StrictStr],
667
+ Field(
668
+ description="Target EntryStore instance. Overrides the X-Entrystore-Host header if both are provided. The value has to be an instance this deployment has been configured to allow; any other host is refused with 400, so a target you cannot reach is a request to the deployment's operator, not a different value to try. Omit it for the deployment's default instance. "
669
+ ),
670
+ ] = None,
671
+ _request_timeout: Union[
672
+ None,
673
+ Annotated[StrictFloat, Field(gt=0)],
674
+ Tuple[
675
+ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
676
+ ],
677
+ ] = None,
678
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
679
+ _content_type: Optional[StrictStr] = None,
680
+ _headers: Optional[Dict[StrictStr, Any]] = None,
681
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
682
+ ) -> RESTResponseType:
683
+ """Delete suggestion
684
+
685
+ Deletes a specific suggestion and its associated metadata. This operation is irreversible. Requires authentication with write access to the entry's context.
686
+
687
+ :param context_id: The context (catalog) identifier in EntryStore (required)
688
+ :type context_id: str
689
+ :param entry_id: The entry identifier within the context (required)
690
+ :type entry_id: str
691
+ :param x_entrystore_host: Target EntryStore instance (alternative to the entrystore_host query parameter, which wins if both are sent). The value has to be an instance this deployment has been configured to allow; any other host is refused with 400. Omit it for the deployment's default instance.
692
+ :type x_entrystore_host: str
693
+ :param entrystore_host: Target EntryStore instance. Overrides the X-Entrystore-Host header if both are provided. The value has to be an instance this deployment has been configured to allow; any other host is refused with 400, so a target you cannot reach is a request to the deployment's operator, not a different value to try. Omit it for the deployment's default instance.
694
+ :type entrystore_host: str
695
+ :param _request_timeout: timeout setting for this request. If one
696
+ number provided, it will be total request
697
+ timeout. It can also be a pair (tuple) of
698
+ (connection, read) timeouts.
699
+ :type _request_timeout: int, tuple(int, int), optional
700
+ :param _request_auth: set to override the auth_settings for an a single
701
+ request; this effectively ignores the
702
+ authentication in the spec for a single request.
703
+ :type _request_auth: dict, optional
704
+ :param _content_type: force content-type for the request.
705
+ :type _content_type: str, Optional
706
+ :param _headers: set to override the headers for a single
707
+ request; this effectively ignores the headers
708
+ in the spec for a single request.
709
+ :type _headers: dict, optional
710
+ :param _host_index: set to override the host_index for a single
711
+ request; this effectively ignores the host_index
712
+ in the spec for a single request.
713
+ :type _host_index: int, optional
714
+ :return: Returns the result object.
715
+ """ # noqa: E501
716
+
717
+ _param = self._delete_suggestion_serialize(
718
+ context_id=context_id,
719
+ entry_id=entry_id,
720
+ x_entrystore_host=x_entrystore_host,
721
+ entrystore_host=entrystore_host,
722
+ _request_auth=_request_auth,
723
+ _content_type=_content_type,
724
+ _headers=_headers,
725
+ _host_index=_host_index,
726
+ )
727
+
728
+ _response_types_map: Dict[str, Optional[str]] = {
729
+ "204": None,
730
+ "400": "Error",
731
+ "401": "Error",
732
+ "403": "Error",
733
+ "404": "Error",
734
+ "409": "Error",
735
+ "500": "Error",
736
+ "503": "Error",
737
+ }
738
+ response_data = await self.api_client.call_api(
739
+ *_param, _request_timeout=_request_timeout
740
+ )
741
+ return response_data.response
742
+
743
+ def _delete_suggestion_serialize(
744
+ self,
745
+ context_id,
746
+ entry_id,
747
+ x_entrystore_host,
748
+ entrystore_host,
749
+ _request_auth,
750
+ _content_type,
751
+ _headers,
752
+ _host_index,
753
+ ) -> RequestSerialized:
754
+
755
+ _host = None
756
+
757
+ _collection_formats: Dict[str, str] = {}
758
+
759
+ _path_params: Dict[str, str] = {}
760
+ _query_params: List[Tuple[str, str]] = []
761
+ _header_params: Dict[str, Optional[str]] = _headers or {}
762
+ _form_params: List[Tuple[str, str]] = []
763
+ _files: Dict[
764
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
765
+ ] = {}
766
+ _body_params: Optional[bytes] = None
767
+
768
+ # process the path parameters
769
+ if context_id is not None:
770
+ _path_params["context_id"] = context_id
771
+ if entry_id is not None:
772
+ _path_params["entry_id"] = entry_id
773
+ # process the query parameters
774
+ if entrystore_host is not None:
775
+
776
+ _query_params.append(("entrystore_host", entrystore_host))
777
+
778
+ # process the header parameters
779
+ if x_entrystore_host is not None:
780
+ _header_params["X-Entrystore-Host"] = x_entrystore_host
781
+ # process the form parameters
782
+ # process the body parameter
783
+
784
+ # set the HTTP header `Accept`
785
+ if "Accept" not in _header_params:
786
+ _header_params["Accept"] = self.api_client.select_header_accept(
787
+ ["application/json"]
788
+ )
789
+
790
+ # authentication setting
791
+ _auth_settings: List[str] = ["auth_token", "auth_header"]
792
+
793
+ return self.api_client.param_serialize(
794
+ method="DELETE",
795
+ resource_path="/suggestion/{context_id}/{entry_id}",
796
+ path_params=_path_params,
797
+ query_params=_query_params,
798
+ header_params=_header_params,
799
+ body=_body_params,
800
+ post_params=_form_params,
801
+ files=_files,
802
+ auth_settings=_auth_settings,
803
+ collection_formats=_collection_formats,
804
+ _host=_host,
805
+ _request_auth=_request_auth,
806
+ )
807
+
808
+ @validate_call
809
+ async def get_suggestion(
810
+ self,
811
+ context_id: Annotated[
812
+ str,
813
+ Field(
814
+ strict=True,
815
+ description="The context (catalog) identifier in EntryStore",
816
+ ),
817
+ ],
818
+ entry_id: Annotated[
819
+ str,
820
+ Field(strict=True, description="The entry identifier within the context"),
821
+ ],
822
+ x_entrystore_host: Annotated[
823
+ Optional[StrictStr],
824
+ Field(
825
+ description="Target EntryStore instance (alternative to the entrystore_host query parameter, which wins if both are sent). The value has to be an instance this deployment has been configured to allow; any other host is refused with 400. Omit it for the deployment's default instance. "
826
+ ),
827
+ ] = None,
828
+ entrystore_host: Annotated[
829
+ Optional[StrictStr],
830
+ Field(
831
+ description="Target EntryStore instance. Overrides the X-Entrystore-Host header if both are provided. The value has to be an instance this deployment has been configured to allow; any other host is refused with 400, so a target you cannot reach is a request to the deployment's operator, not a different value to try. Omit it for the deployment's default instance. "
832
+ ),
833
+ ] = None,
834
+ _request_timeout: Union[
835
+ None,
836
+ Annotated[StrictFloat, Field(gt=0)],
837
+ Tuple[
838
+ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
839
+ ],
840
+ ] = None,
841
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
842
+ _content_type: Optional[StrictStr] = None,
843
+ _headers: Optional[Dict[StrictStr, Any]] = None,
844
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
845
+ ) -> EntityReference:
846
+ """Get suggestion
847
+
848
+ Returns basic reference information for a specific suggestion. Use the /metadata sub-endpoint to retrieve the full metadata. Authentication is optional. Public entries are accessible without authentication. Authenticated requests may access additional non-public entries.
849
+
850
+ :param context_id: The context (catalog) identifier in EntryStore (required)
851
+ :type context_id: str
852
+ :param entry_id: The entry identifier within the context (required)
853
+ :type entry_id: str
854
+ :param x_entrystore_host: Target EntryStore instance (alternative to the entrystore_host query parameter, which wins if both are sent). The value has to be an instance this deployment has been configured to allow; any other host is refused with 400. Omit it for the deployment's default instance.
855
+ :type x_entrystore_host: str
856
+ :param entrystore_host: Target EntryStore instance. Overrides the X-Entrystore-Host header if both are provided. The value has to be an instance this deployment has been configured to allow; any other host is refused with 400, so a target you cannot reach is a request to the deployment's operator, not a different value to try. Omit it for the deployment's default instance.
857
+ :type entrystore_host: str
858
+ :param _request_timeout: timeout setting for this request. If one
859
+ number provided, it will be total request
860
+ timeout. It can also be a pair (tuple) of
861
+ (connection, read) timeouts.
862
+ :type _request_timeout: int, tuple(int, int), optional
863
+ :param _request_auth: set to override the auth_settings for an a single
864
+ request; this effectively ignores the
865
+ authentication in the spec for a single request.
866
+ :type _request_auth: dict, optional
867
+ :param _content_type: force content-type for the request.
868
+ :type _content_type: str, Optional
869
+ :param _headers: set to override the headers for a single
870
+ request; this effectively ignores the headers
871
+ in the spec for a single request.
872
+ :type _headers: dict, optional
873
+ :param _host_index: set to override the host_index for a single
874
+ request; this effectively ignores the host_index
875
+ in the spec for a single request.
876
+ :type _host_index: int, optional
877
+ :return: Returns the result object.
878
+ """ # noqa: E501
879
+
880
+ _param = self._get_suggestion_serialize(
881
+ context_id=context_id,
882
+ entry_id=entry_id,
883
+ x_entrystore_host=x_entrystore_host,
884
+ entrystore_host=entrystore_host,
885
+ _request_auth=_request_auth,
886
+ _content_type=_content_type,
887
+ _headers=_headers,
888
+ _host_index=_host_index,
889
+ )
890
+
891
+ _response_types_map: Dict[str, Optional[str]] = {
892
+ "200": "EntityReference",
893
+ "400": "Error",
894
+ "401": "Error",
895
+ "404": "Error",
896
+ "500": "Error",
897
+ "503": "Error",
898
+ }
899
+ response_data = await self.api_client.call_api(
900
+ *_param, _request_timeout=_request_timeout
901
+ )
902
+ await response_data.read()
903
+ return self.api_client.response_deserialize(
904
+ response_data=response_data,
905
+ response_types_map=_response_types_map,
906
+ ).data
907
+
908
+ @validate_call
909
+ async def get_suggestion_with_http_info(
910
+ self,
911
+ context_id: Annotated[
912
+ str,
913
+ Field(
914
+ strict=True,
915
+ description="The context (catalog) identifier in EntryStore",
916
+ ),
917
+ ],
918
+ entry_id: Annotated[
919
+ str,
920
+ Field(strict=True, description="The entry identifier within the context"),
921
+ ],
922
+ x_entrystore_host: Annotated[
923
+ Optional[StrictStr],
924
+ Field(
925
+ description="Target EntryStore instance (alternative to the entrystore_host query parameter, which wins if both are sent). The value has to be an instance this deployment has been configured to allow; any other host is refused with 400. Omit it for the deployment's default instance. "
926
+ ),
927
+ ] = None,
928
+ entrystore_host: Annotated[
929
+ Optional[StrictStr],
930
+ Field(
931
+ description="Target EntryStore instance. Overrides the X-Entrystore-Host header if both are provided. The value has to be an instance this deployment has been configured to allow; any other host is refused with 400, so a target you cannot reach is a request to the deployment's operator, not a different value to try. Omit it for the deployment's default instance. "
932
+ ),
933
+ ] = None,
934
+ _request_timeout: Union[
935
+ None,
936
+ Annotated[StrictFloat, Field(gt=0)],
937
+ Tuple[
938
+ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
939
+ ],
940
+ ] = None,
941
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
942
+ _content_type: Optional[StrictStr] = None,
943
+ _headers: Optional[Dict[StrictStr, Any]] = None,
944
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
945
+ ) -> ApiResponse[EntityReference]:
946
+ """Get suggestion
947
+
948
+ Returns basic reference information for a specific suggestion. Use the /metadata sub-endpoint to retrieve the full metadata. Authentication is optional. Public entries are accessible without authentication. Authenticated requests may access additional non-public entries.
949
+
950
+ :param context_id: The context (catalog) identifier in EntryStore (required)
951
+ :type context_id: str
952
+ :param entry_id: The entry identifier within the context (required)
953
+ :type entry_id: str
954
+ :param x_entrystore_host: Target EntryStore instance (alternative to the entrystore_host query parameter, which wins if both are sent). The value has to be an instance this deployment has been configured to allow; any other host is refused with 400. Omit it for the deployment's default instance.
955
+ :type x_entrystore_host: str
956
+ :param entrystore_host: Target EntryStore instance. Overrides the X-Entrystore-Host header if both are provided. The value has to be an instance this deployment has been configured to allow; any other host is refused with 400, so a target you cannot reach is a request to the deployment's operator, not a different value to try. Omit it for the deployment's default instance.
957
+ :type entrystore_host: str
958
+ :param _request_timeout: timeout setting for this request. If one
959
+ number provided, it will be total request
960
+ timeout. It can also be a pair (tuple) of
961
+ (connection, read) timeouts.
962
+ :type _request_timeout: int, tuple(int, int), optional
963
+ :param _request_auth: set to override the auth_settings for an a single
964
+ request; this effectively ignores the
965
+ authentication in the spec for a single request.
966
+ :type _request_auth: dict, optional
967
+ :param _content_type: force content-type for the request.
968
+ :type _content_type: str, Optional
969
+ :param _headers: set to override the headers for a single
970
+ request; this effectively ignores the headers
971
+ in the spec for a single request.
972
+ :type _headers: dict, optional
973
+ :param _host_index: set to override the host_index for a single
974
+ request; this effectively ignores the host_index
975
+ in the spec for a single request.
976
+ :type _host_index: int, optional
977
+ :return: Returns the result object.
978
+ """ # noqa: E501
979
+
980
+ _param = self._get_suggestion_serialize(
981
+ context_id=context_id,
982
+ entry_id=entry_id,
983
+ x_entrystore_host=x_entrystore_host,
984
+ entrystore_host=entrystore_host,
985
+ _request_auth=_request_auth,
986
+ _content_type=_content_type,
987
+ _headers=_headers,
988
+ _host_index=_host_index,
989
+ )
990
+
991
+ _response_types_map: Dict[str, Optional[str]] = {
992
+ "200": "EntityReference",
993
+ "400": "Error",
994
+ "401": "Error",
995
+ "404": "Error",
996
+ "500": "Error",
997
+ "503": "Error",
998
+ }
999
+ response_data = await self.api_client.call_api(
1000
+ *_param, _request_timeout=_request_timeout
1001
+ )
1002
+ await response_data.read()
1003
+ return self.api_client.response_deserialize(
1004
+ response_data=response_data,
1005
+ response_types_map=_response_types_map,
1006
+ )
1007
+
1008
+ @validate_call
1009
+ async def get_suggestion_without_preload_content(
1010
+ self,
1011
+ context_id: Annotated[
1012
+ str,
1013
+ Field(
1014
+ strict=True,
1015
+ description="The context (catalog) identifier in EntryStore",
1016
+ ),
1017
+ ],
1018
+ entry_id: Annotated[
1019
+ str,
1020
+ Field(strict=True, description="The entry identifier within the context"),
1021
+ ],
1022
+ x_entrystore_host: Annotated[
1023
+ Optional[StrictStr],
1024
+ Field(
1025
+ description="Target EntryStore instance (alternative to the entrystore_host query parameter, which wins if both are sent). The value has to be an instance this deployment has been configured to allow; any other host is refused with 400. Omit it for the deployment's default instance. "
1026
+ ),
1027
+ ] = None,
1028
+ entrystore_host: Annotated[
1029
+ Optional[StrictStr],
1030
+ Field(
1031
+ description="Target EntryStore instance. Overrides the X-Entrystore-Host header if both are provided. The value has to be an instance this deployment has been configured to allow; any other host is refused with 400, so a target you cannot reach is a request to the deployment's operator, not a different value to try. Omit it for the deployment's default instance. "
1032
+ ),
1033
+ ] = None,
1034
+ _request_timeout: Union[
1035
+ None,
1036
+ Annotated[StrictFloat, Field(gt=0)],
1037
+ Tuple[
1038
+ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
1039
+ ],
1040
+ ] = None,
1041
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1042
+ _content_type: Optional[StrictStr] = None,
1043
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1044
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1045
+ ) -> RESTResponseType:
1046
+ """Get suggestion
1047
+
1048
+ Returns basic reference information for a specific suggestion. Use the /metadata sub-endpoint to retrieve the full metadata. Authentication is optional. Public entries are accessible without authentication. Authenticated requests may access additional non-public entries.
1049
+
1050
+ :param context_id: The context (catalog) identifier in EntryStore (required)
1051
+ :type context_id: str
1052
+ :param entry_id: The entry identifier within the context (required)
1053
+ :type entry_id: str
1054
+ :param x_entrystore_host: Target EntryStore instance (alternative to the entrystore_host query parameter, which wins if both are sent). The value has to be an instance this deployment has been configured to allow; any other host is refused with 400. Omit it for the deployment's default instance.
1055
+ :type x_entrystore_host: str
1056
+ :param entrystore_host: Target EntryStore instance. Overrides the X-Entrystore-Host header if both are provided. The value has to be an instance this deployment has been configured to allow; any other host is refused with 400, so a target you cannot reach is a request to the deployment's operator, not a different value to try. Omit it for the deployment's default instance.
1057
+ :type entrystore_host: str
1058
+ :param _request_timeout: timeout setting for this request. If one
1059
+ number provided, it will be total request
1060
+ timeout. It can also be a pair (tuple) of
1061
+ (connection, read) timeouts.
1062
+ :type _request_timeout: int, tuple(int, int), optional
1063
+ :param _request_auth: set to override the auth_settings for an a single
1064
+ request; this effectively ignores the
1065
+ authentication in the spec for a single request.
1066
+ :type _request_auth: dict, optional
1067
+ :param _content_type: force content-type for the request.
1068
+ :type _content_type: str, Optional
1069
+ :param _headers: set to override the headers for a single
1070
+ request; this effectively ignores the headers
1071
+ in the spec for a single request.
1072
+ :type _headers: dict, optional
1073
+ :param _host_index: set to override the host_index for a single
1074
+ request; this effectively ignores the host_index
1075
+ in the spec for a single request.
1076
+ :type _host_index: int, optional
1077
+ :return: Returns the result object.
1078
+ """ # noqa: E501
1079
+
1080
+ _param = self._get_suggestion_serialize(
1081
+ context_id=context_id,
1082
+ entry_id=entry_id,
1083
+ x_entrystore_host=x_entrystore_host,
1084
+ entrystore_host=entrystore_host,
1085
+ _request_auth=_request_auth,
1086
+ _content_type=_content_type,
1087
+ _headers=_headers,
1088
+ _host_index=_host_index,
1089
+ )
1090
+
1091
+ _response_types_map: Dict[str, Optional[str]] = {
1092
+ "200": "EntityReference",
1093
+ "400": "Error",
1094
+ "401": "Error",
1095
+ "404": "Error",
1096
+ "500": "Error",
1097
+ "503": "Error",
1098
+ }
1099
+ response_data = await self.api_client.call_api(
1100
+ *_param, _request_timeout=_request_timeout
1101
+ )
1102
+ return response_data.response
1103
+
1104
+ def _get_suggestion_serialize(
1105
+ self,
1106
+ context_id,
1107
+ entry_id,
1108
+ x_entrystore_host,
1109
+ entrystore_host,
1110
+ _request_auth,
1111
+ _content_type,
1112
+ _headers,
1113
+ _host_index,
1114
+ ) -> RequestSerialized:
1115
+
1116
+ _host = None
1117
+
1118
+ _collection_formats: Dict[str, str] = {}
1119
+
1120
+ _path_params: Dict[str, str] = {}
1121
+ _query_params: List[Tuple[str, str]] = []
1122
+ _header_params: Dict[str, Optional[str]] = _headers or {}
1123
+ _form_params: List[Tuple[str, str]] = []
1124
+ _files: Dict[
1125
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
1126
+ ] = {}
1127
+ _body_params: Optional[bytes] = None
1128
+
1129
+ # process the path parameters
1130
+ if context_id is not None:
1131
+ _path_params["context_id"] = context_id
1132
+ if entry_id is not None:
1133
+ _path_params["entry_id"] = entry_id
1134
+ # process the query parameters
1135
+ if entrystore_host is not None:
1136
+
1137
+ _query_params.append(("entrystore_host", entrystore_host))
1138
+
1139
+ # process the header parameters
1140
+ if x_entrystore_host is not None:
1141
+ _header_params["X-Entrystore-Host"] = x_entrystore_host
1142
+ # process the form parameters
1143
+ # process the body parameter
1144
+
1145
+ # set the HTTP header `Accept`
1146
+ if "Accept" not in _header_params:
1147
+ _header_params["Accept"] = self.api_client.select_header_accept(
1148
+ ["application/json"]
1149
+ )
1150
+
1151
+ # authentication setting
1152
+ _auth_settings: List[str] = ["auth_token", "auth_header"]
1153
+
1154
+ return self.api_client.param_serialize(
1155
+ method="GET",
1156
+ resource_path="/suggestion/{context_id}/{entry_id}",
1157
+ path_params=_path_params,
1158
+ query_params=_query_params,
1159
+ header_params=_header_params,
1160
+ body=_body_params,
1161
+ post_params=_form_params,
1162
+ files=_files,
1163
+ auth_settings=_auth_settings,
1164
+ collection_formats=_collection_formats,
1165
+ _host=_host,
1166
+ _request_auth=_request_auth,
1167
+ )
1168
+
1169
+ @validate_call
1170
+ async def get_suggestion_metadata(
1171
+ self,
1172
+ context_id: Annotated[
1173
+ str,
1174
+ Field(
1175
+ strict=True,
1176
+ description="The context (catalog) identifier in EntryStore",
1177
+ ),
1178
+ ],
1179
+ entry_id: Annotated[
1180
+ str,
1181
+ Field(strict=True, description="The entry identifier within the context"),
1182
+ ],
1183
+ x_entrystore_host: Annotated[
1184
+ Optional[StrictStr],
1185
+ Field(
1186
+ description="Target EntryStore instance (alternative to the entrystore_host query parameter, which wins if both are sent). The value has to be an instance this deployment has been configured to allow; any other host is refused with 400. Omit it for the deployment's default instance. "
1187
+ ),
1188
+ ] = None,
1189
+ entrystore_host: Annotated[
1190
+ Optional[StrictStr],
1191
+ Field(
1192
+ description="Target EntryStore instance. Overrides the X-Entrystore-Host header if both are provided. The value has to be an instance this deployment has been configured to allow; any other host is refused with 400, so a target you cannot reach is a request to the deployment's operator, not a different value to try. Omit it for the deployment's default instance. "
1193
+ ),
1194
+ ] = None,
1195
+ format: Annotated[
1196
+ Optional[MetadataFormat],
1197
+ Field(
1198
+ description="Response format for metadata. Defaults to JSON-LD (json-ld). Supported formats: - `json-ld` - JSON-LD format (default) - `rdf-json` - RDF/JSON format (simpler structure) - `turtle` - Turtle format - `n-triples` - N-Triples format - `rdf-xml` - RDF/XML format "
1199
+ ),
1200
+ ] = None,
1201
+ _request_timeout: Union[
1202
+ None,
1203
+ Annotated[StrictFloat, Field(gt=0)],
1204
+ Tuple[
1205
+ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
1206
+ ],
1207
+ ] = None,
1208
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1209
+ _content_type: Optional[StrictStr] = None,
1210
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1211
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1212
+ ) -> Dict[str, object]:
1213
+ """Get suggestion metadata
1214
+
1215
+ Returns raw DCAT-AP metadata for a specific suggestion. The response format can be specified using the `format` query parameter. Authentication is optional. Public entries are accessible without authentication. Authenticated requests may access additional non-public entries.
1216
+
1217
+ :param context_id: The context (catalog) identifier in EntryStore (required)
1218
+ :type context_id: str
1219
+ :param entry_id: The entry identifier within the context (required)
1220
+ :type entry_id: str
1221
+ :param x_entrystore_host: Target EntryStore instance (alternative to the entrystore_host query parameter, which wins if both are sent). The value has to be an instance this deployment has been configured to allow; any other host is refused with 400. Omit it for the deployment's default instance.
1222
+ :type x_entrystore_host: str
1223
+ :param entrystore_host: Target EntryStore instance. Overrides the X-Entrystore-Host header if both are provided. The value has to be an instance this deployment has been configured to allow; any other host is refused with 400, so a target you cannot reach is a request to the deployment's operator, not a different value to try. Omit it for the deployment's default instance.
1224
+ :type entrystore_host: str
1225
+ :param format: Response format for metadata. Defaults to JSON-LD (json-ld). Supported formats: - `json-ld` - JSON-LD format (default) - `rdf-json` - RDF/JSON format (simpler structure) - `turtle` - Turtle format - `n-triples` - N-Triples format - `rdf-xml` - RDF/XML format
1226
+ :type format: MetadataFormat
1227
+ :param _request_timeout: timeout setting for this request. If one
1228
+ number provided, it will be total request
1229
+ timeout. It can also be a pair (tuple) of
1230
+ (connection, read) timeouts.
1231
+ :type _request_timeout: int, tuple(int, int), optional
1232
+ :param _request_auth: set to override the auth_settings for an a single
1233
+ request; this effectively ignores the
1234
+ authentication in the spec for a single request.
1235
+ :type _request_auth: dict, optional
1236
+ :param _content_type: force content-type for the request.
1237
+ :type _content_type: str, Optional
1238
+ :param _headers: set to override the headers for a single
1239
+ request; this effectively ignores the headers
1240
+ in the spec for a single request.
1241
+ :type _headers: dict, optional
1242
+ :param _host_index: set to override the host_index for a single
1243
+ request; this effectively ignores the host_index
1244
+ in the spec for a single request.
1245
+ :type _host_index: int, optional
1246
+ :return: Returns the result object.
1247
+ """ # noqa: E501
1248
+
1249
+ _param = self._get_suggestion_metadata_serialize(
1250
+ context_id=context_id,
1251
+ entry_id=entry_id,
1252
+ x_entrystore_host=x_entrystore_host,
1253
+ entrystore_host=entrystore_host,
1254
+ format=format,
1255
+ _request_auth=_request_auth,
1256
+ _content_type=_content_type,
1257
+ _headers=_headers,
1258
+ _host_index=_host_index,
1259
+ )
1260
+
1261
+ _response_types_map: Dict[str, Optional[str]] = {
1262
+ "200": "Dict[str, object]",
1263
+ "400": "Error",
1264
+ "401": "Error",
1265
+ "404": "Error",
1266
+ "500": "Error",
1267
+ "503": "Error",
1268
+ }
1269
+ response_data = await self.api_client.call_api(
1270
+ *_param, _request_timeout=_request_timeout
1271
+ )
1272
+ await response_data.read()
1273
+ return self.api_client.response_deserialize(
1274
+ response_data=response_data,
1275
+ response_types_map=_response_types_map,
1276
+ ).data
1277
+
1278
+ @validate_call
1279
+ async def get_suggestion_metadata_with_http_info(
1280
+ self,
1281
+ context_id: Annotated[
1282
+ str,
1283
+ Field(
1284
+ strict=True,
1285
+ description="The context (catalog) identifier in EntryStore",
1286
+ ),
1287
+ ],
1288
+ entry_id: Annotated[
1289
+ str,
1290
+ Field(strict=True, description="The entry identifier within the context"),
1291
+ ],
1292
+ x_entrystore_host: Annotated[
1293
+ Optional[StrictStr],
1294
+ Field(
1295
+ description="Target EntryStore instance (alternative to the entrystore_host query parameter, which wins if both are sent). The value has to be an instance this deployment has been configured to allow; any other host is refused with 400. Omit it for the deployment's default instance. "
1296
+ ),
1297
+ ] = None,
1298
+ entrystore_host: Annotated[
1299
+ Optional[StrictStr],
1300
+ Field(
1301
+ description="Target EntryStore instance. Overrides the X-Entrystore-Host header if both are provided. The value has to be an instance this deployment has been configured to allow; any other host is refused with 400, so a target you cannot reach is a request to the deployment's operator, not a different value to try. Omit it for the deployment's default instance. "
1302
+ ),
1303
+ ] = None,
1304
+ format: Annotated[
1305
+ Optional[MetadataFormat],
1306
+ Field(
1307
+ description="Response format for metadata. Defaults to JSON-LD (json-ld). Supported formats: - `json-ld` - JSON-LD format (default) - `rdf-json` - RDF/JSON format (simpler structure) - `turtle` - Turtle format - `n-triples` - N-Triples format - `rdf-xml` - RDF/XML format "
1308
+ ),
1309
+ ] = None,
1310
+ _request_timeout: Union[
1311
+ None,
1312
+ Annotated[StrictFloat, Field(gt=0)],
1313
+ Tuple[
1314
+ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
1315
+ ],
1316
+ ] = None,
1317
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1318
+ _content_type: Optional[StrictStr] = None,
1319
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1320
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1321
+ ) -> ApiResponse[Dict[str, object]]:
1322
+ """Get suggestion metadata
1323
+
1324
+ Returns raw DCAT-AP metadata for a specific suggestion. The response format can be specified using the `format` query parameter. Authentication is optional. Public entries are accessible without authentication. Authenticated requests may access additional non-public entries.
1325
+
1326
+ :param context_id: The context (catalog) identifier in EntryStore (required)
1327
+ :type context_id: str
1328
+ :param entry_id: The entry identifier within the context (required)
1329
+ :type entry_id: str
1330
+ :param x_entrystore_host: Target EntryStore instance (alternative to the entrystore_host query parameter, which wins if both are sent). The value has to be an instance this deployment has been configured to allow; any other host is refused with 400. Omit it for the deployment's default instance.
1331
+ :type x_entrystore_host: str
1332
+ :param entrystore_host: Target EntryStore instance. Overrides the X-Entrystore-Host header if both are provided. The value has to be an instance this deployment has been configured to allow; any other host is refused with 400, so a target you cannot reach is a request to the deployment's operator, not a different value to try. Omit it for the deployment's default instance.
1333
+ :type entrystore_host: str
1334
+ :param format: Response format for metadata. Defaults to JSON-LD (json-ld). Supported formats: - `json-ld` - JSON-LD format (default) - `rdf-json` - RDF/JSON format (simpler structure) - `turtle` - Turtle format - `n-triples` - N-Triples format - `rdf-xml` - RDF/XML format
1335
+ :type format: MetadataFormat
1336
+ :param _request_timeout: timeout setting for this request. If one
1337
+ number provided, it will be total request
1338
+ timeout. It can also be a pair (tuple) of
1339
+ (connection, read) timeouts.
1340
+ :type _request_timeout: int, tuple(int, int), optional
1341
+ :param _request_auth: set to override the auth_settings for an a single
1342
+ request; this effectively ignores the
1343
+ authentication in the spec for a single request.
1344
+ :type _request_auth: dict, optional
1345
+ :param _content_type: force content-type for the request.
1346
+ :type _content_type: str, Optional
1347
+ :param _headers: set to override the headers for a single
1348
+ request; this effectively ignores the headers
1349
+ in the spec for a single request.
1350
+ :type _headers: dict, optional
1351
+ :param _host_index: set to override the host_index for a single
1352
+ request; this effectively ignores the host_index
1353
+ in the spec for a single request.
1354
+ :type _host_index: int, optional
1355
+ :return: Returns the result object.
1356
+ """ # noqa: E501
1357
+
1358
+ _param = self._get_suggestion_metadata_serialize(
1359
+ context_id=context_id,
1360
+ entry_id=entry_id,
1361
+ x_entrystore_host=x_entrystore_host,
1362
+ entrystore_host=entrystore_host,
1363
+ format=format,
1364
+ _request_auth=_request_auth,
1365
+ _content_type=_content_type,
1366
+ _headers=_headers,
1367
+ _host_index=_host_index,
1368
+ )
1369
+
1370
+ _response_types_map: Dict[str, Optional[str]] = {
1371
+ "200": "Dict[str, object]",
1372
+ "400": "Error",
1373
+ "401": "Error",
1374
+ "404": "Error",
1375
+ "500": "Error",
1376
+ "503": "Error",
1377
+ }
1378
+ response_data = await self.api_client.call_api(
1379
+ *_param, _request_timeout=_request_timeout
1380
+ )
1381
+ await response_data.read()
1382
+ return self.api_client.response_deserialize(
1383
+ response_data=response_data,
1384
+ response_types_map=_response_types_map,
1385
+ )
1386
+
1387
+ @validate_call
1388
+ async def get_suggestion_metadata_without_preload_content(
1389
+ self,
1390
+ context_id: Annotated[
1391
+ str,
1392
+ Field(
1393
+ strict=True,
1394
+ description="The context (catalog) identifier in EntryStore",
1395
+ ),
1396
+ ],
1397
+ entry_id: Annotated[
1398
+ str,
1399
+ Field(strict=True, description="The entry identifier within the context"),
1400
+ ],
1401
+ x_entrystore_host: Annotated[
1402
+ Optional[StrictStr],
1403
+ Field(
1404
+ description="Target EntryStore instance (alternative to the entrystore_host query parameter, which wins if both are sent). The value has to be an instance this deployment has been configured to allow; any other host is refused with 400. Omit it for the deployment's default instance. "
1405
+ ),
1406
+ ] = None,
1407
+ entrystore_host: Annotated[
1408
+ Optional[StrictStr],
1409
+ Field(
1410
+ description="Target EntryStore instance. Overrides the X-Entrystore-Host header if both are provided. The value has to be an instance this deployment has been configured to allow; any other host is refused with 400, so a target you cannot reach is a request to the deployment's operator, not a different value to try. Omit it for the deployment's default instance. "
1411
+ ),
1412
+ ] = None,
1413
+ format: Annotated[
1414
+ Optional[MetadataFormat],
1415
+ Field(
1416
+ description="Response format for metadata. Defaults to JSON-LD (json-ld). Supported formats: - `json-ld` - JSON-LD format (default) - `rdf-json` - RDF/JSON format (simpler structure) - `turtle` - Turtle format - `n-triples` - N-Triples format - `rdf-xml` - RDF/XML format "
1417
+ ),
1418
+ ] = None,
1419
+ _request_timeout: Union[
1420
+ None,
1421
+ Annotated[StrictFloat, Field(gt=0)],
1422
+ Tuple[
1423
+ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
1424
+ ],
1425
+ ] = None,
1426
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1427
+ _content_type: Optional[StrictStr] = None,
1428
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1429
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1430
+ ) -> RESTResponseType:
1431
+ """Get suggestion metadata
1432
+
1433
+ Returns raw DCAT-AP metadata for a specific suggestion. The response format can be specified using the `format` query parameter. Authentication is optional. Public entries are accessible without authentication. Authenticated requests may access additional non-public entries.
1434
+
1435
+ :param context_id: The context (catalog) identifier in EntryStore (required)
1436
+ :type context_id: str
1437
+ :param entry_id: The entry identifier within the context (required)
1438
+ :type entry_id: str
1439
+ :param x_entrystore_host: Target EntryStore instance (alternative to the entrystore_host query parameter, which wins if both are sent). The value has to be an instance this deployment has been configured to allow; any other host is refused with 400. Omit it for the deployment's default instance.
1440
+ :type x_entrystore_host: str
1441
+ :param entrystore_host: Target EntryStore instance. Overrides the X-Entrystore-Host header if both are provided. The value has to be an instance this deployment has been configured to allow; any other host is refused with 400, so a target you cannot reach is a request to the deployment's operator, not a different value to try. Omit it for the deployment's default instance.
1442
+ :type entrystore_host: str
1443
+ :param format: Response format for metadata. Defaults to JSON-LD (json-ld). Supported formats: - `json-ld` - JSON-LD format (default) - `rdf-json` - RDF/JSON format (simpler structure) - `turtle` - Turtle format - `n-triples` - N-Triples format - `rdf-xml` - RDF/XML format
1444
+ :type format: MetadataFormat
1445
+ :param _request_timeout: timeout setting for this request. If one
1446
+ number provided, it will be total request
1447
+ timeout. It can also be a pair (tuple) of
1448
+ (connection, read) timeouts.
1449
+ :type _request_timeout: int, tuple(int, int), optional
1450
+ :param _request_auth: set to override the auth_settings for an a single
1451
+ request; this effectively ignores the
1452
+ authentication in the spec for a single request.
1453
+ :type _request_auth: dict, optional
1454
+ :param _content_type: force content-type for the request.
1455
+ :type _content_type: str, Optional
1456
+ :param _headers: set to override the headers for a single
1457
+ request; this effectively ignores the headers
1458
+ in the spec for a single request.
1459
+ :type _headers: dict, optional
1460
+ :param _host_index: set to override the host_index for a single
1461
+ request; this effectively ignores the host_index
1462
+ in the spec for a single request.
1463
+ :type _host_index: int, optional
1464
+ :return: Returns the result object.
1465
+ """ # noqa: E501
1466
+
1467
+ _param = self._get_suggestion_metadata_serialize(
1468
+ context_id=context_id,
1469
+ entry_id=entry_id,
1470
+ x_entrystore_host=x_entrystore_host,
1471
+ entrystore_host=entrystore_host,
1472
+ format=format,
1473
+ _request_auth=_request_auth,
1474
+ _content_type=_content_type,
1475
+ _headers=_headers,
1476
+ _host_index=_host_index,
1477
+ )
1478
+
1479
+ _response_types_map: Dict[str, Optional[str]] = {
1480
+ "200": "Dict[str, object]",
1481
+ "400": "Error",
1482
+ "401": "Error",
1483
+ "404": "Error",
1484
+ "500": "Error",
1485
+ "503": "Error",
1486
+ }
1487
+ response_data = await self.api_client.call_api(
1488
+ *_param, _request_timeout=_request_timeout
1489
+ )
1490
+ return response_data.response
1491
+
1492
+ def _get_suggestion_metadata_serialize(
1493
+ self,
1494
+ context_id,
1495
+ entry_id,
1496
+ x_entrystore_host,
1497
+ entrystore_host,
1498
+ format,
1499
+ _request_auth,
1500
+ _content_type,
1501
+ _headers,
1502
+ _host_index,
1503
+ ) -> RequestSerialized:
1504
+
1505
+ _host = None
1506
+
1507
+ _collection_formats: Dict[str, str] = {}
1508
+
1509
+ _path_params: Dict[str, str] = {}
1510
+ _query_params: List[Tuple[str, str]] = []
1511
+ _header_params: Dict[str, Optional[str]] = _headers or {}
1512
+ _form_params: List[Tuple[str, str]] = []
1513
+ _files: Dict[
1514
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
1515
+ ] = {}
1516
+ _body_params: Optional[bytes] = None
1517
+
1518
+ # process the path parameters
1519
+ if context_id is not None:
1520
+ _path_params["context_id"] = context_id
1521
+ if entry_id is not None:
1522
+ _path_params["entry_id"] = entry_id
1523
+ # process the query parameters
1524
+ if entrystore_host is not None:
1525
+
1526
+ _query_params.append(("entrystore_host", entrystore_host))
1527
+
1528
+ if format is not None:
1529
+
1530
+ _query_params.append(("format", format.value))
1531
+
1532
+ # process the header parameters
1533
+ if x_entrystore_host is not None:
1534
+ _header_params["X-Entrystore-Host"] = x_entrystore_host
1535
+ # process the form parameters
1536
+ # process the body parameter
1537
+
1538
+ # set the HTTP header `Accept`
1539
+ if "Accept" not in _header_params:
1540
+ _header_params["Accept"] = self.api_client.select_header_accept(
1541
+ [
1542
+ "application/ld+json",
1543
+ "application/rdf+json",
1544
+ "text/turtle",
1545
+ "application/n-triples",
1546
+ "application/rdf+xml",
1547
+ "application/json",
1548
+ ]
1549
+ )
1550
+
1551
+ # authentication setting
1552
+ _auth_settings: List[str] = ["auth_token", "auth_header"]
1553
+
1554
+ return self.api_client.param_serialize(
1555
+ method="GET",
1556
+ resource_path="/suggestion/{context_id}/{entry_id}/metadata",
1557
+ path_params=_path_params,
1558
+ query_params=_query_params,
1559
+ header_params=_header_params,
1560
+ body=_body_params,
1561
+ post_params=_form_params,
1562
+ files=_files,
1563
+ auth_settings=_auth_settings,
1564
+ collection_formats=_collection_formats,
1565
+ _host=_host,
1566
+ _request_auth=_request_auth,
1567
+ )
1568
+
1569
+ @validate_call
1570
+ async def list_suggestions(
1571
+ self,
1572
+ x_entrystore_host: Annotated[
1573
+ Optional[StrictStr],
1574
+ Field(
1575
+ description="Target EntryStore instance (alternative to the entrystore_host query parameter, which wins if both are sent). The value has to be an instance this deployment has been configured to allow; any other host is refused with 400. Omit it for the deployment's default instance. "
1576
+ ),
1577
+ ] = None,
1578
+ entrystore_host: Annotated[
1579
+ Optional[StrictStr],
1580
+ Field(
1581
+ description="Target EntryStore instance. Overrides the X-Entrystore-Host header if both are provided. The value has to be an instance this deployment has been configured to allow; any other host is refused with 400, so a target you cannot reach is a request to the deployment's operator, not a different value to try. Omit it for the deployment's default instance. "
1582
+ ),
1583
+ ] = None,
1584
+ limit: Annotated[
1585
+ Optional[Annotated[int, Field(le=100, strict=True, ge=1)]],
1586
+ Field(description="Results per page"),
1587
+ ] = None,
1588
+ offset: Annotated[
1589
+ Optional[Annotated[int, Field(strict=True, ge=0)]],
1590
+ Field(description="Results to skip before the first one returned"),
1591
+ ] = None,
1592
+ cursor: Annotated[
1593
+ Optional[Annotated[str, Field(strict=True, max_length=512)]],
1594
+ Field(
1595
+ description="Opaque cursor token for cursor-based pagination. When provided, `offset` is ignored and results start after the position encoded in the cursor. Obtain the cursor value from the `next_cursor` field in a previous response. "
1596
+ ),
1597
+ ] = None,
1598
+ query: Annotated[
1599
+ Optional[Annotated[str, Field(strict=True, max_length=1000)]],
1600
+ Field(
1601
+ description="Free-text search. The value is split on whitespace and every term must match, either as a whole word anywhere in the entry's indexed text — title, description and tags — or as a substring of its title. The value is matched literally: characters that Solr treats as syntax are escaped rather than interpreted, so a query cannot select fields or combine clauses of its own. "
1602
+ ),
1603
+ ] = None,
1604
+ sort: Annotated[
1605
+ Optional[Annotated[str, Field(min_length=1, strict=True, max_length=200)]],
1606
+ Field(
1607
+ description="Sort clauses, comma-separated, highest priority first. A clause is `field+direction`, or `field` alone taking its direction from `sort_order`. The `+` may be sent literally or as `%2B`. Fields: `created`, `modified`, `score`, `title` (the English title; name another as `title.sv`). Anything else is rejected with 400. "
1608
+ ),
1609
+ ] = None,
1610
+ context: Annotated[
1611
+ Optional[Annotated[str, Field(min_length=1, strict=True, max_length=255)]],
1612
+ Field(
1613
+ description="Filter by context ID. Can be specified multiple times to include entries from multiple contexts. "
1614
+ ),
1615
+ ] = None,
1616
+ rdf_type: Annotated[
1617
+ Optional[Annotated[str, Field(strict=True, max_length=2048)]],
1618
+ Field(description="Only entries with this rdf:type URI"),
1619
+ ] = None,
1620
+ public: Annotated[
1621
+ Optional[StrictBool],
1622
+ Field(
1623
+ description="true: only publicly readable entries; false: only non-public entries"
1624
+ ),
1625
+ ] = None,
1626
+ created_after: Annotated[
1627
+ Optional[datetime], Field(description="Created at or after this instant")
1628
+ ] = None,
1629
+ created_before: Annotated[
1630
+ Optional[datetime], Field(description="Created before this instant")
1631
+ ] = None,
1632
+ modified_after: Annotated[
1633
+ Optional[datetime], Field(description="Modified at or after this instant")
1634
+ ] = None,
1635
+ modified_before: Annotated[
1636
+ Optional[datetime], Field(description="Modified before this instant")
1637
+ ] = None,
1638
+ entry_type: Annotated[
1639
+ Optional[ListCatalogsEntryTypeParameter],
1640
+ Field(
1641
+ description="Filter by entry type. Determines how the entry is stored in EntryStore. - `Local`: Resource maintained in the repository (file, list, user, etc.) - `Link`: Resource not in repository, only metadata is local - `Reference`: Both resource and metadata are external (cached locally) - `LinkReference`: Local metadata with external metadata "
1642
+ ),
1643
+ ] = None,
1644
+ graph_type: Annotated[
1645
+ Optional[ListCatalogsGraphTypeParameter],
1646
+ Field(
1647
+ description="Filter by graph type. Determines the nature of the resource. - `None`: No special type (regular files, web resources) - `Context`: Container for other entries - `Systemcontext`: Special system context (_contexts, _principals) - `User`: User resource - `Group`: Group resource - `List`: Ordered list of entries - `Resultlist`: Result list from search - `Graph`: RDF graph resource - `String`: String resource - `Pipeline`: Executable pipeline - `PipelineResult`: Result from pipeline execution "
1648
+ ),
1649
+ ] = None,
1650
+ resource_type: Annotated[
1651
+ Optional[ListCatalogsResourceTypeParameter],
1652
+ Field(
1653
+ description="Filter by resource type. Indicates digital representation availability. - `Information`: Resource has a digital representation - `Resolvable`: Resource resolves to another address - `Named`: No digital representation (abstract entity) - `Unknown`: Representation status unknown (common for harvested data) "
1654
+ ),
1655
+ ] = None,
1656
+ _request_timeout: Union[
1657
+ None,
1658
+ Annotated[StrictFloat, Field(gt=0)],
1659
+ Tuple[
1660
+ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
1661
+ ],
1662
+ ] = None,
1663
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1664
+ _content_type: Optional[StrictStr] = None,
1665
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1666
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1667
+ ) -> EntityListResponse:
1668
+ """List suggestions
1669
+
1670
+ Returns a paginated list of all suggestions. Suggestions are dataset proposals in the catalog workflow. Authentication is optional. Without authentication, only publicly available entries are returned. Authenticated requests may return additional non-public entries. Answered from an asynchronously updated index: an entry created moments ago may be missing here while reading it by id already returns it.
1671
+
1672
+ :param x_entrystore_host: Target EntryStore instance (alternative to the entrystore_host query parameter, which wins if both are sent). The value has to be an instance this deployment has been configured to allow; any other host is refused with 400. Omit it for the deployment's default instance.
1673
+ :type x_entrystore_host: str
1674
+ :param entrystore_host: Target EntryStore instance. Overrides the X-Entrystore-Host header if both are provided. The value has to be an instance this deployment has been configured to allow; any other host is refused with 400, so a target you cannot reach is a request to the deployment's operator, not a different value to try. Omit it for the deployment's default instance.
1675
+ :type entrystore_host: str
1676
+ :param limit: Results per page
1677
+ :type limit: int
1678
+ :param offset: Results to skip before the first one returned
1679
+ :type offset: int
1680
+ :param cursor: Opaque cursor token for cursor-based pagination. When provided, `offset` is ignored and results start after the position encoded in the cursor. Obtain the cursor value from the `next_cursor` field in a previous response.
1681
+ :type cursor: str
1682
+ :param query: Free-text search. The value is split on whitespace and every term must match, either as a whole word anywhere in the entry's indexed text — title, description and tags — or as a substring of its title. The value is matched literally: characters that Solr treats as syntax are escaped rather than interpreted, so a query cannot select fields or combine clauses of its own.
1683
+ :type query: str
1684
+ :param sort: Sort clauses, comma-separated, highest priority first. A clause is `field+direction`, or `field` alone taking its direction from `sort_order`. The `+` may be sent literally or as `%2B`. Fields: `created`, `modified`, `score`, `title` (the English title; name another as `title.sv`). Anything else is rejected with 400.
1685
+ :type sort: str
1686
+ :param context: Filter by context ID. Can be specified multiple times to include entries from multiple contexts.
1687
+ :type context: str
1688
+ :param rdf_type: Only entries with this rdf:type URI
1689
+ :type rdf_type: str
1690
+ :param public: true: only publicly readable entries; false: only non-public entries
1691
+ :type public: bool
1692
+ :param created_after: Created at or after this instant
1693
+ :type created_after: datetime
1694
+ :param created_before: Created before this instant
1695
+ :type created_before: datetime
1696
+ :param modified_after: Modified at or after this instant
1697
+ :type modified_after: datetime
1698
+ :param modified_before: Modified before this instant
1699
+ :type modified_before: datetime
1700
+ :param entry_type: Filter by entry type. Determines how the entry is stored in EntryStore. - `Local`: Resource maintained in the repository (file, list, user, etc.) - `Link`: Resource not in repository, only metadata is local - `Reference`: Both resource and metadata are external (cached locally) - `LinkReference`: Local metadata with external metadata
1701
+ :type entry_type: ListCatalogsEntryTypeParameter
1702
+ :param graph_type: Filter by graph type. Determines the nature of the resource. - `None`: No special type (regular files, web resources) - `Context`: Container for other entries - `Systemcontext`: Special system context (_contexts, _principals) - `User`: User resource - `Group`: Group resource - `List`: Ordered list of entries - `Resultlist`: Result list from search - `Graph`: RDF graph resource - `String`: String resource - `Pipeline`: Executable pipeline - `PipelineResult`: Result from pipeline execution
1703
+ :type graph_type: ListCatalogsGraphTypeParameter
1704
+ :param resource_type: Filter by resource type. Indicates digital representation availability. - `Information`: Resource has a digital representation - `Resolvable`: Resource resolves to another address - `Named`: No digital representation (abstract entity) - `Unknown`: Representation status unknown (common for harvested data)
1705
+ :type resource_type: ListCatalogsResourceTypeParameter
1706
+ :param _request_timeout: timeout setting for this request. If one
1707
+ number provided, it will be total request
1708
+ timeout. It can also be a pair (tuple) of
1709
+ (connection, read) timeouts.
1710
+ :type _request_timeout: int, tuple(int, int), optional
1711
+ :param _request_auth: set to override the auth_settings for an a single
1712
+ request; this effectively ignores the
1713
+ authentication in the spec for a single request.
1714
+ :type _request_auth: dict, optional
1715
+ :param _content_type: force content-type for the request.
1716
+ :type _content_type: str, Optional
1717
+ :param _headers: set to override the headers for a single
1718
+ request; this effectively ignores the headers
1719
+ in the spec for a single request.
1720
+ :type _headers: dict, optional
1721
+ :param _host_index: set to override the host_index for a single
1722
+ request; this effectively ignores the host_index
1723
+ in the spec for a single request.
1724
+ :type _host_index: int, optional
1725
+ :return: Returns the result object.
1726
+ """ # noqa: E501
1727
+
1728
+ _param = self._list_suggestions_serialize(
1729
+ x_entrystore_host=x_entrystore_host,
1730
+ entrystore_host=entrystore_host,
1731
+ limit=limit,
1732
+ offset=offset,
1733
+ cursor=cursor,
1734
+ query=query,
1735
+ sort=sort,
1736
+ context=context,
1737
+ rdf_type=rdf_type,
1738
+ public=public,
1739
+ created_after=created_after,
1740
+ created_before=created_before,
1741
+ modified_after=modified_after,
1742
+ modified_before=modified_before,
1743
+ entry_type=entry_type,
1744
+ graph_type=graph_type,
1745
+ resource_type=resource_type,
1746
+ _request_auth=_request_auth,
1747
+ _content_type=_content_type,
1748
+ _headers=_headers,
1749
+ _host_index=_host_index,
1750
+ )
1751
+
1752
+ _response_types_map: Dict[str, Optional[str]] = {
1753
+ "200": "EntityListResponse",
1754
+ "400": "Error",
1755
+ "401": "Error",
1756
+ "500": "Error",
1757
+ "503": "Error",
1758
+ }
1759
+ response_data = await self.api_client.call_api(
1760
+ *_param, _request_timeout=_request_timeout
1761
+ )
1762
+ await response_data.read()
1763
+ return self.api_client.response_deserialize(
1764
+ response_data=response_data,
1765
+ response_types_map=_response_types_map,
1766
+ ).data
1767
+
1768
+ @validate_call
1769
+ async def list_suggestions_with_http_info(
1770
+ self,
1771
+ x_entrystore_host: Annotated[
1772
+ Optional[StrictStr],
1773
+ Field(
1774
+ description="Target EntryStore instance (alternative to the entrystore_host query parameter, which wins if both are sent). The value has to be an instance this deployment has been configured to allow; any other host is refused with 400. Omit it for the deployment's default instance. "
1775
+ ),
1776
+ ] = None,
1777
+ entrystore_host: Annotated[
1778
+ Optional[StrictStr],
1779
+ Field(
1780
+ description="Target EntryStore instance. Overrides the X-Entrystore-Host header if both are provided. The value has to be an instance this deployment has been configured to allow; any other host is refused with 400, so a target you cannot reach is a request to the deployment's operator, not a different value to try. Omit it for the deployment's default instance. "
1781
+ ),
1782
+ ] = None,
1783
+ limit: Annotated[
1784
+ Optional[Annotated[int, Field(le=100, strict=True, ge=1)]],
1785
+ Field(description="Results per page"),
1786
+ ] = None,
1787
+ offset: Annotated[
1788
+ Optional[Annotated[int, Field(strict=True, ge=0)]],
1789
+ Field(description="Results to skip before the first one returned"),
1790
+ ] = None,
1791
+ cursor: Annotated[
1792
+ Optional[Annotated[str, Field(strict=True, max_length=512)]],
1793
+ Field(
1794
+ description="Opaque cursor token for cursor-based pagination. When provided, `offset` is ignored and results start after the position encoded in the cursor. Obtain the cursor value from the `next_cursor` field in a previous response. "
1795
+ ),
1796
+ ] = None,
1797
+ query: Annotated[
1798
+ Optional[Annotated[str, Field(strict=True, max_length=1000)]],
1799
+ Field(
1800
+ description="Free-text search. The value is split on whitespace and every term must match, either as a whole word anywhere in the entry's indexed text — title, description and tags — or as a substring of its title. The value is matched literally: characters that Solr treats as syntax are escaped rather than interpreted, so a query cannot select fields or combine clauses of its own. "
1801
+ ),
1802
+ ] = None,
1803
+ sort: Annotated[
1804
+ Optional[Annotated[str, Field(min_length=1, strict=True, max_length=200)]],
1805
+ Field(
1806
+ description="Sort clauses, comma-separated, highest priority first. A clause is `field+direction`, or `field` alone taking its direction from `sort_order`. The `+` may be sent literally or as `%2B`. Fields: `created`, `modified`, `score`, `title` (the English title; name another as `title.sv`). Anything else is rejected with 400. "
1807
+ ),
1808
+ ] = None,
1809
+ context: Annotated[
1810
+ Optional[Annotated[str, Field(min_length=1, strict=True, max_length=255)]],
1811
+ Field(
1812
+ description="Filter by context ID. Can be specified multiple times to include entries from multiple contexts. "
1813
+ ),
1814
+ ] = None,
1815
+ rdf_type: Annotated[
1816
+ Optional[Annotated[str, Field(strict=True, max_length=2048)]],
1817
+ Field(description="Only entries with this rdf:type URI"),
1818
+ ] = None,
1819
+ public: Annotated[
1820
+ Optional[StrictBool],
1821
+ Field(
1822
+ description="true: only publicly readable entries; false: only non-public entries"
1823
+ ),
1824
+ ] = None,
1825
+ created_after: Annotated[
1826
+ Optional[datetime], Field(description="Created at or after this instant")
1827
+ ] = None,
1828
+ created_before: Annotated[
1829
+ Optional[datetime], Field(description="Created before this instant")
1830
+ ] = None,
1831
+ modified_after: Annotated[
1832
+ Optional[datetime], Field(description="Modified at or after this instant")
1833
+ ] = None,
1834
+ modified_before: Annotated[
1835
+ Optional[datetime], Field(description="Modified before this instant")
1836
+ ] = None,
1837
+ entry_type: Annotated[
1838
+ Optional[ListCatalogsEntryTypeParameter],
1839
+ Field(
1840
+ description="Filter by entry type. Determines how the entry is stored in EntryStore. - `Local`: Resource maintained in the repository (file, list, user, etc.) - `Link`: Resource not in repository, only metadata is local - `Reference`: Both resource and metadata are external (cached locally) - `LinkReference`: Local metadata with external metadata "
1841
+ ),
1842
+ ] = None,
1843
+ graph_type: Annotated[
1844
+ Optional[ListCatalogsGraphTypeParameter],
1845
+ Field(
1846
+ description="Filter by graph type. Determines the nature of the resource. - `None`: No special type (regular files, web resources) - `Context`: Container for other entries - `Systemcontext`: Special system context (_contexts, _principals) - `User`: User resource - `Group`: Group resource - `List`: Ordered list of entries - `Resultlist`: Result list from search - `Graph`: RDF graph resource - `String`: String resource - `Pipeline`: Executable pipeline - `PipelineResult`: Result from pipeline execution "
1847
+ ),
1848
+ ] = None,
1849
+ resource_type: Annotated[
1850
+ Optional[ListCatalogsResourceTypeParameter],
1851
+ Field(
1852
+ description="Filter by resource type. Indicates digital representation availability. - `Information`: Resource has a digital representation - `Resolvable`: Resource resolves to another address - `Named`: No digital representation (abstract entity) - `Unknown`: Representation status unknown (common for harvested data) "
1853
+ ),
1854
+ ] = None,
1855
+ _request_timeout: Union[
1856
+ None,
1857
+ Annotated[StrictFloat, Field(gt=0)],
1858
+ Tuple[
1859
+ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
1860
+ ],
1861
+ ] = None,
1862
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1863
+ _content_type: Optional[StrictStr] = None,
1864
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1865
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1866
+ ) -> ApiResponse[EntityListResponse]:
1867
+ """List suggestions
1868
+
1869
+ Returns a paginated list of all suggestions. Suggestions are dataset proposals in the catalog workflow. Authentication is optional. Without authentication, only publicly available entries are returned. Authenticated requests may return additional non-public entries. Answered from an asynchronously updated index: an entry created moments ago may be missing here while reading it by id already returns it.
1870
+
1871
+ :param x_entrystore_host: Target EntryStore instance (alternative to the entrystore_host query parameter, which wins if both are sent). The value has to be an instance this deployment has been configured to allow; any other host is refused with 400. Omit it for the deployment's default instance.
1872
+ :type x_entrystore_host: str
1873
+ :param entrystore_host: Target EntryStore instance. Overrides the X-Entrystore-Host header if both are provided. The value has to be an instance this deployment has been configured to allow; any other host is refused with 400, so a target you cannot reach is a request to the deployment's operator, not a different value to try. Omit it for the deployment's default instance.
1874
+ :type entrystore_host: str
1875
+ :param limit: Results per page
1876
+ :type limit: int
1877
+ :param offset: Results to skip before the first one returned
1878
+ :type offset: int
1879
+ :param cursor: Opaque cursor token for cursor-based pagination. When provided, `offset` is ignored and results start after the position encoded in the cursor. Obtain the cursor value from the `next_cursor` field in a previous response.
1880
+ :type cursor: str
1881
+ :param query: Free-text search. The value is split on whitespace and every term must match, either as a whole word anywhere in the entry's indexed text — title, description and tags — or as a substring of its title. The value is matched literally: characters that Solr treats as syntax are escaped rather than interpreted, so a query cannot select fields or combine clauses of its own.
1882
+ :type query: str
1883
+ :param sort: Sort clauses, comma-separated, highest priority first. A clause is `field+direction`, or `field` alone taking its direction from `sort_order`. The `+` may be sent literally or as `%2B`. Fields: `created`, `modified`, `score`, `title` (the English title; name another as `title.sv`). Anything else is rejected with 400.
1884
+ :type sort: str
1885
+ :param context: Filter by context ID. Can be specified multiple times to include entries from multiple contexts.
1886
+ :type context: str
1887
+ :param rdf_type: Only entries with this rdf:type URI
1888
+ :type rdf_type: str
1889
+ :param public: true: only publicly readable entries; false: only non-public entries
1890
+ :type public: bool
1891
+ :param created_after: Created at or after this instant
1892
+ :type created_after: datetime
1893
+ :param created_before: Created before this instant
1894
+ :type created_before: datetime
1895
+ :param modified_after: Modified at or after this instant
1896
+ :type modified_after: datetime
1897
+ :param modified_before: Modified before this instant
1898
+ :type modified_before: datetime
1899
+ :param entry_type: Filter by entry type. Determines how the entry is stored in EntryStore. - `Local`: Resource maintained in the repository (file, list, user, etc.) - `Link`: Resource not in repository, only metadata is local - `Reference`: Both resource and metadata are external (cached locally) - `LinkReference`: Local metadata with external metadata
1900
+ :type entry_type: ListCatalogsEntryTypeParameter
1901
+ :param graph_type: Filter by graph type. Determines the nature of the resource. - `None`: No special type (regular files, web resources) - `Context`: Container for other entries - `Systemcontext`: Special system context (_contexts, _principals) - `User`: User resource - `Group`: Group resource - `List`: Ordered list of entries - `Resultlist`: Result list from search - `Graph`: RDF graph resource - `String`: String resource - `Pipeline`: Executable pipeline - `PipelineResult`: Result from pipeline execution
1902
+ :type graph_type: ListCatalogsGraphTypeParameter
1903
+ :param resource_type: Filter by resource type. Indicates digital representation availability. - `Information`: Resource has a digital representation - `Resolvable`: Resource resolves to another address - `Named`: No digital representation (abstract entity) - `Unknown`: Representation status unknown (common for harvested data)
1904
+ :type resource_type: ListCatalogsResourceTypeParameter
1905
+ :param _request_timeout: timeout setting for this request. If one
1906
+ number provided, it will be total request
1907
+ timeout. It can also be a pair (tuple) of
1908
+ (connection, read) timeouts.
1909
+ :type _request_timeout: int, tuple(int, int), optional
1910
+ :param _request_auth: set to override the auth_settings for an a single
1911
+ request; this effectively ignores the
1912
+ authentication in the spec for a single request.
1913
+ :type _request_auth: dict, optional
1914
+ :param _content_type: force content-type for the request.
1915
+ :type _content_type: str, Optional
1916
+ :param _headers: set to override the headers for a single
1917
+ request; this effectively ignores the headers
1918
+ in the spec for a single request.
1919
+ :type _headers: dict, optional
1920
+ :param _host_index: set to override the host_index for a single
1921
+ request; this effectively ignores the host_index
1922
+ in the spec for a single request.
1923
+ :type _host_index: int, optional
1924
+ :return: Returns the result object.
1925
+ """ # noqa: E501
1926
+
1927
+ _param = self._list_suggestions_serialize(
1928
+ x_entrystore_host=x_entrystore_host,
1929
+ entrystore_host=entrystore_host,
1930
+ limit=limit,
1931
+ offset=offset,
1932
+ cursor=cursor,
1933
+ query=query,
1934
+ sort=sort,
1935
+ context=context,
1936
+ rdf_type=rdf_type,
1937
+ public=public,
1938
+ created_after=created_after,
1939
+ created_before=created_before,
1940
+ modified_after=modified_after,
1941
+ modified_before=modified_before,
1942
+ entry_type=entry_type,
1943
+ graph_type=graph_type,
1944
+ resource_type=resource_type,
1945
+ _request_auth=_request_auth,
1946
+ _content_type=_content_type,
1947
+ _headers=_headers,
1948
+ _host_index=_host_index,
1949
+ )
1950
+
1951
+ _response_types_map: Dict[str, Optional[str]] = {
1952
+ "200": "EntityListResponse",
1953
+ "400": "Error",
1954
+ "401": "Error",
1955
+ "500": "Error",
1956
+ "503": "Error",
1957
+ }
1958
+ response_data = await self.api_client.call_api(
1959
+ *_param, _request_timeout=_request_timeout
1960
+ )
1961
+ await response_data.read()
1962
+ return self.api_client.response_deserialize(
1963
+ response_data=response_data,
1964
+ response_types_map=_response_types_map,
1965
+ )
1966
+
1967
+ @validate_call
1968
+ async def list_suggestions_without_preload_content(
1969
+ self,
1970
+ x_entrystore_host: Annotated[
1971
+ Optional[StrictStr],
1972
+ Field(
1973
+ description="Target EntryStore instance (alternative to the entrystore_host query parameter, which wins if both are sent). The value has to be an instance this deployment has been configured to allow; any other host is refused with 400. Omit it for the deployment's default instance. "
1974
+ ),
1975
+ ] = None,
1976
+ entrystore_host: Annotated[
1977
+ Optional[StrictStr],
1978
+ Field(
1979
+ description="Target EntryStore instance. Overrides the X-Entrystore-Host header if both are provided. The value has to be an instance this deployment has been configured to allow; any other host is refused with 400, so a target you cannot reach is a request to the deployment's operator, not a different value to try. Omit it for the deployment's default instance. "
1980
+ ),
1981
+ ] = None,
1982
+ limit: Annotated[
1983
+ Optional[Annotated[int, Field(le=100, strict=True, ge=1)]],
1984
+ Field(description="Results per page"),
1985
+ ] = None,
1986
+ offset: Annotated[
1987
+ Optional[Annotated[int, Field(strict=True, ge=0)]],
1988
+ Field(description="Results to skip before the first one returned"),
1989
+ ] = None,
1990
+ cursor: Annotated[
1991
+ Optional[Annotated[str, Field(strict=True, max_length=512)]],
1992
+ Field(
1993
+ description="Opaque cursor token for cursor-based pagination. When provided, `offset` is ignored and results start after the position encoded in the cursor. Obtain the cursor value from the `next_cursor` field in a previous response. "
1994
+ ),
1995
+ ] = None,
1996
+ query: Annotated[
1997
+ Optional[Annotated[str, Field(strict=True, max_length=1000)]],
1998
+ Field(
1999
+ description="Free-text search. The value is split on whitespace and every term must match, either as a whole word anywhere in the entry's indexed text — title, description and tags — or as a substring of its title. The value is matched literally: characters that Solr treats as syntax are escaped rather than interpreted, so a query cannot select fields or combine clauses of its own. "
2000
+ ),
2001
+ ] = None,
2002
+ sort: Annotated[
2003
+ Optional[Annotated[str, Field(min_length=1, strict=True, max_length=200)]],
2004
+ Field(
2005
+ description="Sort clauses, comma-separated, highest priority first. A clause is `field+direction`, or `field` alone taking its direction from `sort_order`. The `+` may be sent literally or as `%2B`. Fields: `created`, `modified`, `score`, `title` (the English title; name another as `title.sv`). Anything else is rejected with 400. "
2006
+ ),
2007
+ ] = None,
2008
+ context: Annotated[
2009
+ Optional[Annotated[str, Field(min_length=1, strict=True, max_length=255)]],
2010
+ Field(
2011
+ description="Filter by context ID. Can be specified multiple times to include entries from multiple contexts. "
2012
+ ),
2013
+ ] = None,
2014
+ rdf_type: Annotated[
2015
+ Optional[Annotated[str, Field(strict=True, max_length=2048)]],
2016
+ Field(description="Only entries with this rdf:type URI"),
2017
+ ] = None,
2018
+ public: Annotated[
2019
+ Optional[StrictBool],
2020
+ Field(
2021
+ description="true: only publicly readable entries; false: only non-public entries"
2022
+ ),
2023
+ ] = None,
2024
+ created_after: Annotated[
2025
+ Optional[datetime], Field(description="Created at or after this instant")
2026
+ ] = None,
2027
+ created_before: Annotated[
2028
+ Optional[datetime], Field(description="Created before this instant")
2029
+ ] = None,
2030
+ modified_after: Annotated[
2031
+ Optional[datetime], Field(description="Modified at or after this instant")
2032
+ ] = None,
2033
+ modified_before: Annotated[
2034
+ Optional[datetime], Field(description="Modified before this instant")
2035
+ ] = None,
2036
+ entry_type: Annotated[
2037
+ Optional[ListCatalogsEntryTypeParameter],
2038
+ Field(
2039
+ description="Filter by entry type. Determines how the entry is stored in EntryStore. - `Local`: Resource maintained in the repository (file, list, user, etc.) - `Link`: Resource not in repository, only metadata is local - `Reference`: Both resource and metadata are external (cached locally) - `LinkReference`: Local metadata with external metadata "
2040
+ ),
2041
+ ] = None,
2042
+ graph_type: Annotated[
2043
+ Optional[ListCatalogsGraphTypeParameter],
2044
+ Field(
2045
+ description="Filter by graph type. Determines the nature of the resource. - `None`: No special type (regular files, web resources) - `Context`: Container for other entries - `Systemcontext`: Special system context (_contexts, _principals) - `User`: User resource - `Group`: Group resource - `List`: Ordered list of entries - `Resultlist`: Result list from search - `Graph`: RDF graph resource - `String`: String resource - `Pipeline`: Executable pipeline - `PipelineResult`: Result from pipeline execution "
2046
+ ),
2047
+ ] = None,
2048
+ resource_type: Annotated[
2049
+ Optional[ListCatalogsResourceTypeParameter],
2050
+ Field(
2051
+ description="Filter by resource type. Indicates digital representation availability. - `Information`: Resource has a digital representation - `Resolvable`: Resource resolves to another address - `Named`: No digital representation (abstract entity) - `Unknown`: Representation status unknown (common for harvested data) "
2052
+ ),
2053
+ ] = None,
2054
+ _request_timeout: Union[
2055
+ None,
2056
+ Annotated[StrictFloat, Field(gt=0)],
2057
+ Tuple[
2058
+ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
2059
+ ],
2060
+ ] = None,
2061
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
2062
+ _content_type: Optional[StrictStr] = None,
2063
+ _headers: Optional[Dict[StrictStr, Any]] = None,
2064
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
2065
+ ) -> RESTResponseType:
2066
+ """List suggestions
2067
+
2068
+ Returns a paginated list of all suggestions. Suggestions are dataset proposals in the catalog workflow. Authentication is optional. Without authentication, only publicly available entries are returned. Authenticated requests may return additional non-public entries. Answered from an asynchronously updated index: an entry created moments ago may be missing here while reading it by id already returns it.
2069
+
2070
+ :param x_entrystore_host: Target EntryStore instance (alternative to the entrystore_host query parameter, which wins if both are sent). The value has to be an instance this deployment has been configured to allow; any other host is refused with 400. Omit it for the deployment's default instance.
2071
+ :type x_entrystore_host: str
2072
+ :param entrystore_host: Target EntryStore instance. Overrides the X-Entrystore-Host header if both are provided. The value has to be an instance this deployment has been configured to allow; any other host is refused with 400, so a target you cannot reach is a request to the deployment's operator, not a different value to try. Omit it for the deployment's default instance.
2073
+ :type entrystore_host: str
2074
+ :param limit: Results per page
2075
+ :type limit: int
2076
+ :param offset: Results to skip before the first one returned
2077
+ :type offset: int
2078
+ :param cursor: Opaque cursor token for cursor-based pagination. When provided, `offset` is ignored and results start after the position encoded in the cursor. Obtain the cursor value from the `next_cursor` field in a previous response.
2079
+ :type cursor: str
2080
+ :param query: Free-text search. The value is split on whitespace and every term must match, either as a whole word anywhere in the entry's indexed text — title, description and tags — or as a substring of its title. The value is matched literally: characters that Solr treats as syntax are escaped rather than interpreted, so a query cannot select fields or combine clauses of its own.
2081
+ :type query: str
2082
+ :param sort: Sort clauses, comma-separated, highest priority first. A clause is `field+direction`, or `field` alone taking its direction from `sort_order`. The `+` may be sent literally or as `%2B`. Fields: `created`, `modified`, `score`, `title` (the English title; name another as `title.sv`). Anything else is rejected with 400.
2083
+ :type sort: str
2084
+ :param context: Filter by context ID. Can be specified multiple times to include entries from multiple contexts.
2085
+ :type context: str
2086
+ :param rdf_type: Only entries with this rdf:type URI
2087
+ :type rdf_type: str
2088
+ :param public: true: only publicly readable entries; false: only non-public entries
2089
+ :type public: bool
2090
+ :param created_after: Created at or after this instant
2091
+ :type created_after: datetime
2092
+ :param created_before: Created before this instant
2093
+ :type created_before: datetime
2094
+ :param modified_after: Modified at or after this instant
2095
+ :type modified_after: datetime
2096
+ :param modified_before: Modified before this instant
2097
+ :type modified_before: datetime
2098
+ :param entry_type: Filter by entry type. Determines how the entry is stored in EntryStore. - `Local`: Resource maintained in the repository (file, list, user, etc.) - `Link`: Resource not in repository, only metadata is local - `Reference`: Both resource and metadata are external (cached locally) - `LinkReference`: Local metadata with external metadata
2099
+ :type entry_type: ListCatalogsEntryTypeParameter
2100
+ :param graph_type: Filter by graph type. Determines the nature of the resource. - `None`: No special type (regular files, web resources) - `Context`: Container for other entries - `Systemcontext`: Special system context (_contexts, _principals) - `User`: User resource - `Group`: Group resource - `List`: Ordered list of entries - `Resultlist`: Result list from search - `Graph`: RDF graph resource - `String`: String resource - `Pipeline`: Executable pipeline - `PipelineResult`: Result from pipeline execution
2101
+ :type graph_type: ListCatalogsGraphTypeParameter
2102
+ :param resource_type: Filter by resource type. Indicates digital representation availability. - `Information`: Resource has a digital representation - `Resolvable`: Resource resolves to another address - `Named`: No digital representation (abstract entity) - `Unknown`: Representation status unknown (common for harvested data)
2103
+ :type resource_type: ListCatalogsResourceTypeParameter
2104
+ :param _request_timeout: timeout setting for this request. If one
2105
+ number provided, it will be total request
2106
+ timeout. It can also be a pair (tuple) of
2107
+ (connection, read) timeouts.
2108
+ :type _request_timeout: int, tuple(int, int), optional
2109
+ :param _request_auth: set to override the auth_settings for an a single
2110
+ request; this effectively ignores the
2111
+ authentication in the spec for a single request.
2112
+ :type _request_auth: dict, optional
2113
+ :param _content_type: force content-type for the request.
2114
+ :type _content_type: str, Optional
2115
+ :param _headers: set to override the headers for a single
2116
+ request; this effectively ignores the headers
2117
+ in the spec for a single request.
2118
+ :type _headers: dict, optional
2119
+ :param _host_index: set to override the host_index for a single
2120
+ request; this effectively ignores the host_index
2121
+ in the spec for a single request.
2122
+ :type _host_index: int, optional
2123
+ :return: Returns the result object.
2124
+ """ # noqa: E501
2125
+
2126
+ _param = self._list_suggestions_serialize(
2127
+ x_entrystore_host=x_entrystore_host,
2128
+ entrystore_host=entrystore_host,
2129
+ limit=limit,
2130
+ offset=offset,
2131
+ cursor=cursor,
2132
+ query=query,
2133
+ sort=sort,
2134
+ context=context,
2135
+ rdf_type=rdf_type,
2136
+ public=public,
2137
+ created_after=created_after,
2138
+ created_before=created_before,
2139
+ modified_after=modified_after,
2140
+ modified_before=modified_before,
2141
+ entry_type=entry_type,
2142
+ graph_type=graph_type,
2143
+ resource_type=resource_type,
2144
+ _request_auth=_request_auth,
2145
+ _content_type=_content_type,
2146
+ _headers=_headers,
2147
+ _host_index=_host_index,
2148
+ )
2149
+
2150
+ _response_types_map: Dict[str, Optional[str]] = {
2151
+ "200": "EntityListResponse",
2152
+ "400": "Error",
2153
+ "401": "Error",
2154
+ "500": "Error",
2155
+ "503": "Error",
2156
+ }
2157
+ response_data = await self.api_client.call_api(
2158
+ *_param, _request_timeout=_request_timeout
2159
+ )
2160
+ return response_data.response
2161
+
2162
+ def _list_suggestions_serialize(
2163
+ self,
2164
+ x_entrystore_host,
2165
+ entrystore_host,
2166
+ limit,
2167
+ offset,
2168
+ cursor,
2169
+ query,
2170
+ sort,
2171
+ context,
2172
+ rdf_type,
2173
+ public,
2174
+ created_after,
2175
+ created_before,
2176
+ modified_after,
2177
+ modified_before,
2178
+ entry_type,
2179
+ graph_type,
2180
+ resource_type,
2181
+ _request_auth,
2182
+ _content_type,
2183
+ _headers,
2184
+ _host_index,
2185
+ ) -> RequestSerialized:
2186
+
2187
+ _host = None
2188
+
2189
+ _collection_formats: Dict[str, str] = {}
2190
+
2191
+ _path_params: Dict[str, str] = {}
2192
+ _query_params: List[Tuple[str, str]] = []
2193
+ _header_params: Dict[str, Optional[str]] = _headers or {}
2194
+ _form_params: List[Tuple[str, str]] = []
2195
+ _files: Dict[
2196
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
2197
+ ] = {}
2198
+ _body_params: Optional[bytes] = None
2199
+
2200
+ # process the path parameters
2201
+ # process the query parameters
2202
+ if entrystore_host is not None:
2203
+
2204
+ _query_params.append(("entrystore_host", entrystore_host))
2205
+
2206
+ if limit is not None:
2207
+
2208
+ _query_params.append(("limit", limit))
2209
+
2210
+ if offset is not None:
2211
+
2212
+ _query_params.append(("offset", offset))
2213
+
2214
+ if cursor is not None:
2215
+
2216
+ _query_params.append(("cursor", cursor))
2217
+
2218
+ if query is not None:
2219
+
2220
+ _query_params.append(("query", query))
2221
+
2222
+ if sort is not None:
2223
+
2224
+ _query_params.append(("sort", sort))
2225
+
2226
+ if context is not None:
2227
+
2228
+ _query_params.append(("context", context))
2229
+
2230
+ if rdf_type is not None:
2231
+
2232
+ _query_params.append(("rdf_type", rdf_type))
2233
+
2234
+ if public is not None:
2235
+
2236
+ _query_params.append(("public", public))
2237
+
2238
+ if created_after is not None:
2239
+ if isinstance(created_after, datetime):
2240
+ _query_params.append(
2241
+ (
2242
+ "created_after",
2243
+ created_after.strftime(
2244
+ self.api_client.configuration.datetime_format
2245
+ ),
2246
+ )
2247
+ )
2248
+ else:
2249
+ _query_params.append(("created_after", created_after))
2250
+
2251
+ if created_before is not None:
2252
+ if isinstance(created_before, datetime):
2253
+ _query_params.append(
2254
+ (
2255
+ "created_before",
2256
+ created_before.strftime(
2257
+ self.api_client.configuration.datetime_format
2258
+ ),
2259
+ )
2260
+ )
2261
+ else:
2262
+ _query_params.append(("created_before", created_before))
2263
+
2264
+ if modified_after is not None:
2265
+ if isinstance(modified_after, datetime):
2266
+ _query_params.append(
2267
+ (
2268
+ "modified_after",
2269
+ modified_after.strftime(
2270
+ self.api_client.configuration.datetime_format
2271
+ ),
2272
+ )
2273
+ )
2274
+ else:
2275
+ _query_params.append(("modified_after", modified_after))
2276
+
2277
+ if modified_before is not None:
2278
+ if isinstance(modified_before, datetime):
2279
+ _query_params.append(
2280
+ (
2281
+ "modified_before",
2282
+ modified_before.strftime(
2283
+ self.api_client.configuration.datetime_format
2284
+ ),
2285
+ )
2286
+ )
2287
+ else:
2288
+ _query_params.append(("modified_before", modified_before))
2289
+
2290
+ if entry_type is not None:
2291
+
2292
+ _query_params.append(("entry_type", entry_type.value))
2293
+
2294
+ if graph_type is not None:
2295
+
2296
+ _query_params.append(("graph_type", graph_type.value))
2297
+
2298
+ if resource_type is not None:
2299
+
2300
+ _query_params.append(("resource_type", resource_type.value))
2301
+
2302
+ # process the header parameters
2303
+ if x_entrystore_host is not None:
2304
+ _header_params["X-Entrystore-Host"] = x_entrystore_host
2305
+ # process the form parameters
2306
+ # process the body parameter
2307
+
2308
+ # set the HTTP header `Accept`
2309
+ if "Accept" not in _header_params:
2310
+ _header_params["Accept"] = self.api_client.select_header_accept(
2311
+ ["application/json"]
2312
+ )
2313
+
2314
+ # authentication setting
2315
+ _auth_settings: List[str] = ["auth_token", "auth_header"]
2316
+
2317
+ return self.api_client.param_serialize(
2318
+ method="GET",
2319
+ resource_path="/suggestion",
2320
+ path_params=_path_params,
2321
+ query_params=_query_params,
2322
+ header_params=_header_params,
2323
+ body=_body_params,
2324
+ post_params=_form_params,
2325
+ files=_files,
2326
+ auth_settings=_auth_settings,
2327
+ collection_formats=_collection_formats,
2328
+ _host=_host,
2329
+ _request_auth=_request_auth,
2330
+ )
2331
+
2332
+ @validate_call
2333
+ async def update_suggestion_metadata(
2334
+ self,
2335
+ context_id: Annotated[
2336
+ str,
2337
+ Field(
2338
+ strict=True,
2339
+ description="The context (catalog) identifier in EntryStore",
2340
+ ),
2341
+ ],
2342
+ entry_id: Annotated[
2343
+ str,
2344
+ Field(strict=True, description="The entry identifier within the context"),
2345
+ ],
2346
+ metadata_request: Annotated[
2347
+ MetadataRequest,
2348
+ Field(
2349
+ description="Metadata that replaces the entry's current metadata. With Content-Type application/ld+json the structured MetadataRequest schema applies. Raw RDF is also accepted and forwarded verbatim to EntryStore when the Content-Type is text/turtle, application/rdf+xml, application/n-triples, or application/rdf+json (see the endpoint description). "
2350
+ ),
2351
+ ],
2352
+ x_entrystore_host: Annotated[
2353
+ Optional[StrictStr],
2354
+ Field(
2355
+ description="Target EntryStore instance (alternative to the entrystore_host query parameter, which wins if both are sent). The value has to be an instance this deployment has been configured to allow; any other host is refused with 400. Omit it for the deployment's default instance. "
2356
+ ),
2357
+ ] = None,
2358
+ entrystore_host: Annotated[
2359
+ Optional[StrictStr],
2360
+ Field(
2361
+ description="Target EntryStore instance. Overrides the X-Entrystore-Host header if both are provided. The value has to be an instance this deployment has been configured to allow; any other host is refused with 400, so a target you cannot reach is a request to the deployment's operator, not a different value to try. Omit it for the deployment's default instance. "
2362
+ ),
2363
+ ] = None,
2364
+ _request_timeout: Union[
2365
+ None,
2366
+ Annotated[StrictFloat, Field(gt=0)],
2367
+ Tuple[
2368
+ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
2369
+ ],
2370
+ ] = None,
2371
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
2372
+ _content_type: Optional[StrictStr] = None,
2373
+ _headers: Optional[Dict[StrictStr, Any]] = None,
2374
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
2375
+ ) -> Dict[str, object]:
2376
+ """Update suggestion metadata
2377
+
2378
+ Replaces the metadata for a specific suggestion. The request body is forwarded directly to EntryStore without structural transformation; use the Content-Type header to select the RDF serialization (application/ld+json, text/turtle, application/rdf+xml, application/n-triples, or application/rdf+json). This is a full replacement, not a partial update. Requires authentication with write access to the entry's context.
2379
+
2380
+ :param context_id: The context (catalog) identifier in EntryStore (required)
2381
+ :type context_id: str
2382
+ :param entry_id: The entry identifier within the context (required)
2383
+ :type entry_id: str
2384
+ :param metadata_request: Metadata that replaces the entry's current metadata. With Content-Type application/ld+json the structured MetadataRequest schema applies. Raw RDF is also accepted and forwarded verbatim to EntryStore when the Content-Type is text/turtle, application/rdf+xml, application/n-triples, or application/rdf+json (see the endpoint description). (required)
2385
+ :type metadata_request: MetadataRequest
2386
+ :param x_entrystore_host: Target EntryStore instance (alternative to the entrystore_host query parameter, which wins if both are sent). The value has to be an instance this deployment has been configured to allow; any other host is refused with 400. Omit it for the deployment's default instance.
2387
+ :type x_entrystore_host: str
2388
+ :param entrystore_host: Target EntryStore instance. Overrides the X-Entrystore-Host header if both are provided. The value has to be an instance this deployment has been configured to allow; any other host is refused with 400, so a target you cannot reach is a request to the deployment's operator, not a different value to try. Omit it for the deployment's default instance.
2389
+ :type entrystore_host: str
2390
+ :param _request_timeout: timeout setting for this request. If one
2391
+ number provided, it will be total request
2392
+ timeout. It can also be a pair (tuple) of
2393
+ (connection, read) timeouts.
2394
+ :type _request_timeout: int, tuple(int, int), optional
2395
+ :param _request_auth: set to override the auth_settings for an a single
2396
+ request; this effectively ignores the
2397
+ authentication in the spec for a single request.
2398
+ :type _request_auth: dict, optional
2399
+ :param _content_type: force content-type for the request.
2400
+ :type _content_type: str, Optional
2401
+ :param _headers: set to override the headers for a single
2402
+ request; this effectively ignores the headers
2403
+ in the spec for a single request.
2404
+ :type _headers: dict, optional
2405
+ :param _host_index: set to override the host_index for a single
2406
+ request; this effectively ignores the host_index
2407
+ in the spec for a single request.
2408
+ :type _host_index: int, optional
2409
+ :return: Returns the result object.
2410
+ """ # noqa: E501
2411
+
2412
+ _param = self._update_suggestion_metadata_serialize(
2413
+ context_id=context_id,
2414
+ entry_id=entry_id,
2415
+ metadata_request=metadata_request,
2416
+ x_entrystore_host=x_entrystore_host,
2417
+ entrystore_host=entrystore_host,
2418
+ _request_auth=_request_auth,
2419
+ _content_type=_content_type,
2420
+ _headers=_headers,
2421
+ _host_index=_host_index,
2422
+ )
2423
+
2424
+ _response_types_map: Dict[str, Optional[str]] = {
2425
+ "200": "Dict[str, object]",
2426
+ "400": "Error",
2427
+ "401": "Error",
2428
+ "403": "Error",
2429
+ "404": "Error",
2430
+ "409": "Error",
2431
+ "422": "ValidationResponse",
2432
+ "500": "Error",
2433
+ "503": "Error",
2434
+ }
2435
+ response_data = await self.api_client.call_api(
2436
+ *_param, _request_timeout=_request_timeout
2437
+ )
2438
+ await response_data.read()
2439
+ return self.api_client.response_deserialize(
2440
+ response_data=response_data,
2441
+ response_types_map=_response_types_map,
2442
+ ).data
2443
+
2444
+ @validate_call
2445
+ async def update_suggestion_metadata_with_http_info(
2446
+ self,
2447
+ context_id: Annotated[
2448
+ str,
2449
+ Field(
2450
+ strict=True,
2451
+ description="The context (catalog) identifier in EntryStore",
2452
+ ),
2453
+ ],
2454
+ entry_id: Annotated[
2455
+ str,
2456
+ Field(strict=True, description="The entry identifier within the context"),
2457
+ ],
2458
+ metadata_request: Annotated[
2459
+ MetadataRequest,
2460
+ Field(
2461
+ description="Metadata that replaces the entry's current metadata. With Content-Type application/ld+json the structured MetadataRequest schema applies. Raw RDF is also accepted and forwarded verbatim to EntryStore when the Content-Type is text/turtle, application/rdf+xml, application/n-triples, or application/rdf+json (see the endpoint description). "
2462
+ ),
2463
+ ],
2464
+ x_entrystore_host: Annotated[
2465
+ Optional[StrictStr],
2466
+ Field(
2467
+ description="Target EntryStore instance (alternative to the entrystore_host query parameter, which wins if both are sent). The value has to be an instance this deployment has been configured to allow; any other host is refused with 400. Omit it for the deployment's default instance. "
2468
+ ),
2469
+ ] = None,
2470
+ entrystore_host: Annotated[
2471
+ Optional[StrictStr],
2472
+ Field(
2473
+ description="Target EntryStore instance. Overrides the X-Entrystore-Host header if both are provided. The value has to be an instance this deployment has been configured to allow; any other host is refused with 400, so a target you cannot reach is a request to the deployment's operator, not a different value to try. Omit it for the deployment's default instance. "
2474
+ ),
2475
+ ] = None,
2476
+ _request_timeout: Union[
2477
+ None,
2478
+ Annotated[StrictFloat, Field(gt=0)],
2479
+ Tuple[
2480
+ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
2481
+ ],
2482
+ ] = None,
2483
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
2484
+ _content_type: Optional[StrictStr] = None,
2485
+ _headers: Optional[Dict[StrictStr, Any]] = None,
2486
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
2487
+ ) -> ApiResponse[Dict[str, object]]:
2488
+ """Update suggestion metadata
2489
+
2490
+ Replaces the metadata for a specific suggestion. The request body is forwarded directly to EntryStore without structural transformation; use the Content-Type header to select the RDF serialization (application/ld+json, text/turtle, application/rdf+xml, application/n-triples, or application/rdf+json). This is a full replacement, not a partial update. Requires authentication with write access to the entry's context.
2491
+
2492
+ :param context_id: The context (catalog) identifier in EntryStore (required)
2493
+ :type context_id: str
2494
+ :param entry_id: The entry identifier within the context (required)
2495
+ :type entry_id: str
2496
+ :param metadata_request: Metadata that replaces the entry's current metadata. With Content-Type application/ld+json the structured MetadataRequest schema applies. Raw RDF is also accepted and forwarded verbatim to EntryStore when the Content-Type is text/turtle, application/rdf+xml, application/n-triples, or application/rdf+json (see the endpoint description). (required)
2497
+ :type metadata_request: MetadataRequest
2498
+ :param x_entrystore_host: Target EntryStore instance (alternative to the entrystore_host query parameter, which wins if both are sent). The value has to be an instance this deployment has been configured to allow; any other host is refused with 400. Omit it for the deployment's default instance.
2499
+ :type x_entrystore_host: str
2500
+ :param entrystore_host: Target EntryStore instance. Overrides the X-Entrystore-Host header if both are provided. The value has to be an instance this deployment has been configured to allow; any other host is refused with 400, so a target you cannot reach is a request to the deployment's operator, not a different value to try. Omit it for the deployment's default instance.
2501
+ :type entrystore_host: str
2502
+ :param _request_timeout: timeout setting for this request. If one
2503
+ number provided, it will be total request
2504
+ timeout. It can also be a pair (tuple) of
2505
+ (connection, read) timeouts.
2506
+ :type _request_timeout: int, tuple(int, int), optional
2507
+ :param _request_auth: set to override the auth_settings for an a single
2508
+ request; this effectively ignores the
2509
+ authentication in the spec for a single request.
2510
+ :type _request_auth: dict, optional
2511
+ :param _content_type: force content-type for the request.
2512
+ :type _content_type: str, Optional
2513
+ :param _headers: set to override the headers for a single
2514
+ request; this effectively ignores the headers
2515
+ in the spec for a single request.
2516
+ :type _headers: dict, optional
2517
+ :param _host_index: set to override the host_index for a single
2518
+ request; this effectively ignores the host_index
2519
+ in the spec for a single request.
2520
+ :type _host_index: int, optional
2521
+ :return: Returns the result object.
2522
+ """ # noqa: E501
2523
+
2524
+ _param = self._update_suggestion_metadata_serialize(
2525
+ context_id=context_id,
2526
+ entry_id=entry_id,
2527
+ metadata_request=metadata_request,
2528
+ x_entrystore_host=x_entrystore_host,
2529
+ entrystore_host=entrystore_host,
2530
+ _request_auth=_request_auth,
2531
+ _content_type=_content_type,
2532
+ _headers=_headers,
2533
+ _host_index=_host_index,
2534
+ )
2535
+
2536
+ _response_types_map: Dict[str, Optional[str]] = {
2537
+ "200": "Dict[str, object]",
2538
+ "400": "Error",
2539
+ "401": "Error",
2540
+ "403": "Error",
2541
+ "404": "Error",
2542
+ "409": "Error",
2543
+ "422": "ValidationResponse",
2544
+ "500": "Error",
2545
+ "503": "Error",
2546
+ }
2547
+ response_data = await self.api_client.call_api(
2548
+ *_param, _request_timeout=_request_timeout
2549
+ )
2550
+ await response_data.read()
2551
+ return self.api_client.response_deserialize(
2552
+ response_data=response_data,
2553
+ response_types_map=_response_types_map,
2554
+ )
2555
+
2556
+ @validate_call
2557
+ async def update_suggestion_metadata_without_preload_content(
2558
+ self,
2559
+ context_id: Annotated[
2560
+ str,
2561
+ Field(
2562
+ strict=True,
2563
+ description="The context (catalog) identifier in EntryStore",
2564
+ ),
2565
+ ],
2566
+ entry_id: Annotated[
2567
+ str,
2568
+ Field(strict=True, description="The entry identifier within the context"),
2569
+ ],
2570
+ metadata_request: Annotated[
2571
+ MetadataRequest,
2572
+ Field(
2573
+ description="Metadata that replaces the entry's current metadata. With Content-Type application/ld+json the structured MetadataRequest schema applies. Raw RDF is also accepted and forwarded verbatim to EntryStore when the Content-Type is text/turtle, application/rdf+xml, application/n-triples, or application/rdf+json (see the endpoint description). "
2574
+ ),
2575
+ ],
2576
+ x_entrystore_host: Annotated[
2577
+ Optional[StrictStr],
2578
+ Field(
2579
+ description="Target EntryStore instance (alternative to the entrystore_host query parameter, which wins if both are sent). The value has to be an instance this deployment has been configured to allow; any other host is refused with 400. Omit it for the deployment's default instance. "
2580
+ ),
2581
+ ] = None,
2582
+ entrystore_host: Annotated[
2583
+ Optional[StrictStr],
2584
+ Field(
2585
+ description="Target EntryStore instance. Overrides the X-Entrystore-Host header if both are provided. The value has to be an instance this deployment has been configured to allow; any other host is refused with 400, so a target you cannot reach is a request to the deployment's operator, not a different value to try. Omit it for the deployment's default instance. "
2586
+ ),
2587
+ ] = None,
2588
+ _request_timeout: Union[
2589
+ None,
2590
+ Annotated[StrictFloat, Field(gt=0)],
2591
+ Tuple[
2592
+ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
2593
+ ],
2594
+ ] = None,
2595
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
2596
+ _content_type: Optional[StrictStr] = None,
2597
+ _headers: Optional[Dict[StrictStr, Any]] = None,
2598
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
2599
+ ) -> RESTResponseType:
2600
+ """Update suggestion metadata
2601
+
2602
+ Replaces the metadata for a specific suggestion. The request body is forwarded directly to EntryStore without structural transformation; use the Content-Type header to select the RDF serialization (application/ld+json, text/turtle, application/rdf+xml, application/n-triples, or application/rdf+json). This is a full replacement, not a partial update. Requires authentication with write access to the entry's context.
2603
+
2604
+ :param context_id: The context (catalog) identifier in EntryStore (required)
2605
+ :type context_id: str
2606
+ :param entry_id: The entry identifier within the context (required)
2607
+ :type entry_id: str
2608
+ :param metadata_request: Metadata that replaces the entry's current metadata. With Content-Type application/ld+json the structured MetadataRequest schema applies. Raw RDF is also accepted and forwarded verbatim to EntryStore when the Content-Type is text/turtle, application/rdf+xml, application/n-triples, or application/rdf+json (see the endpoint description). (required)
2609
+ :type metadata_request: MetadataRequest
2610
+ :param x_entrystore_host: Target EntryStore instance (alternative to the entrystore_host query parameter, which wins if both are sent). The value has to be an instance this deployment has been configured to allow; any other host is refused with 400. Omit it for the deployment's default instance.
2611
+ :type x_entrystore_host: str
2612
+ :param entrystore_host: Target EntryStore instance. Overrides the X-Entrystore-Host header if both are provided. The value has to be an instance this deployment has been configured to allow; any other host is refused with 400, so a target you cannot reach is a request to the deployment's operator, not a different value to try. Omit it for the deployment's default instance.
2613
+ :type entrystore_host: str
2614
+ :param _request_timeout: timeout setting for this request. If one
2615
+ number provided, it will be total request
2616
+ timeout. It can also be a pair (tuple) of
2617
+ (connection, read) timeouts.
2618
+ :type _request_timeout: int, tuple(int, int), optional
2619
+ :param _request_auth: set to override the auth_settings for an a single
2620
+ request; this effectively ignores the
2621
+ authentication in the spec for a single request.
2622
+ :type _request_auth: dict, optional
2623
+ :param _content_type: force content-type for the request.
2624
+ :type _content_type: str, Optional
2625
+ :param _headers: set to override the headers for a single
2626
+ request; this effectively ignores the headers
2627
+ in the spec for a single request.
2628
+ :type _headers: dict, optional
2629
+ :param _host_index: set to override the host_index for a single
2630
+ request; this effectively ignores the host_index
2631
+ in the spec for a single request.
2632
+ :type _host_index: int, optional
2633
+ :return: Returns the result object.
2634
+ """ # noqa: E501
2635
+
2636
+ _param = self._update_suggestion_metadata_serialize(
2637
+ context_id=context_id,
2638
+ entry_id=entry_id,
2639
+ metadata_request=metadata_request,
2640
+ x_entrystore_host=x_entrystore_host,
2641
+ entrystore_host=entrystore_host,
2642
+ _request_auth=_request_auth,
2643
+ _content_type=_content_type,
2644
+ _headers=_headers,
2645
+ _host_index=_host_index,
2646
+ )
2647
+
2648
+ _response_types_map: Dict[str, Optional[str]] = {
2649
+ "200": "Dict[str, object]",
2650
+ "400": "Error",
2651
+ "401": "Error",
2652
+ "403": "Error",
2653
+ "404": "Error",
2654
+ "409": "Error",
2655
+ "422": "ValidationResponse",
2656
+ "500": "Error",
2657
+ "503": "Error",
2658
+ }
2659
+ response_data = await self.api_client.call_api(
2660
+ *_param, _request_timeout=_request_timeout
2661
+ )
2662
+ return response_data.response
2663
+
2664
+ def _update_suggestion_metadata_serialize(
2665
+ self,
2666
+ context_id,
2667
+ entry_id,
2668
+ metadata_request,
2669
+ x_entrystore_host,
2670
+ entrystore_host,
2671
+ _request_auth,
2672
+ _content_type,
2673
+ _headers,
2674
+ _host_index,
2675
+ ) -> RequestSerialized:
2676
+
2677
+ _host = None
2678
+
2679
+ _collection_formats: Dict[str, str] = {}
2680
+
2681
+ _path_params: Dict[str, str] = {}
2682
+ _query_params: List[Tuple[str, str]] = []
2683
+ _header_params: Dict[str, Optional[str]] = _headers or {}
2684
+ _form_params: List[Tuple[str, str]] = []
2685
+ _files: Dict[
2686
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
2687
+ ] = {}
2688
+ _body_params: Optional[bytes] = None
2689
+
2690
+ # process the path parameters
2691
+ if context_id is not None:
2692
+ _path_params["context_id"] = context_id
2693
+ if entry_id is not None:
2694
+ _path_params["entry_id"] = entry_id
2695
+ # process the query parameters
2696
+ if entrystore_host is not None:
2697
+
2698
+ _query_params.append(("entrystore_host", entrystore_host))
2699
+
2700
+ # process the header parameters
2701
+ if x_entrystore_host is not None:
2702
+ _header_params["X-Entrystore-Host"] = x_entrystore_host
2703
+ # process the form parameters
2704
+ # process the body parameter
2705
+ if metadata_request is not None:
2706
+ _body_params = metadata_request
2707
+
2708
+ # set the HTTP header `Accept`
2709
+ if "Accept" not in _header_params:
2710
+ _header_params["Accept"] = self.api_client.select_header_accept(
2711
+ ["application/ld+json", "application/json"]
2712
+ )
2713
+
2714
+ # set the HTTP header `Content-Type`
2715
+ if _content_type:
2716
+ _header_params["Content-Type"] = _content_type
2717
+ else:
2718
+ _default_content_type = self.api_client.select_header_content_type(
2719
+ ["application/ld+json"]
2720
+ )
2721
+ if _default_content_type is not None:
2722
+ _header_params["Content-Type"] = _default_content_type
2723
+
2724
+ # authentication setting
2725
+ _auth_settings: List[str] = ["auth_token", "auth_header"]
2726
+
2727
+ return self.api_client.param_serialize(
2728
+ method="PUT",
2729
+ resource_path="/suggestion/{context_id}/{entry_id}/metadata",
2730
+ path_params=_path_params,
2731
+ query_params=_query_params,
2732
+ header_params=_header_params,
2733
+ body=_body_params,
2734
+ post_params=_form_params,
2735
+ files=_files,
2736
+ auth_settings=_auth_settings,
2737
+ collection_formats=_collection_formats,
2738
+ _host=_host,
2739
+ _request_auth=_request_auth,
2740
+ )