1use std::sync::Arc;
12
13use async_trait::async_trait;
14#[cfg(feature = "mockall")]
15use mockall::automock;
16use reqwest;
17use serde::{Deserialize, Serialize, de::Error as _};
18
19use super::{Error, configuration};
20use crate::{
21 apis::{AuthRequired, ContentType, ResponseContent},
22 models,
23};
24
25#[cfg_attr(feature = "mockall", automock)]
26#[cfg_attr(target_arch = "wasm32", async_trait(?Send))]
27#[cfg_attr(not(target_arch = "wasm32"), async_trait)]
28pub trait CollectionsApi: Send + Sync {
29 async fn delete<'a>(
31 &self,
32 org_id: uuid::Uuid,
33 id: uuid::Uuid,
34 ) -> Result<(), Error<DeleteError>>;
35
36 async fn delete_many<'a>(
38 &self,
39 org_id: uuid::Uuid,
40 collection_bulk_delete_request_model: Option<models::CollectionBulkDeleteRequestModel>,
41 ) -> Result<(), Error<DeleteManyError>>;
42
43 async fn get<'a>(
45 &self,
46 org_id: uuid::Uuid,
47 id: uuid::Uuid,
48 ) -> Result<models::CollectionResponseModel, Error<GetError>>;
49
50 async fn get_all<'a>(
52 &self,
53 org_id: uuid::Uuid,
54 ) -> Result<models::CollectionResponseModelListResponseModel, Error<GetAllError>>;
55
56 async fn get_details<'a>(
58 &self,
59 org_id: uuid::Uuid,
60 id: uuid::Uuid,
61 ) -> Result<models::CollectionAccessDetailsResponseModel, Error<GetDetailsError>>;
62
63 async fn get_many_with_details<'a>(
65 &self,
66 org_id: uuid::Uuid,
67 ) -> Result<
68 models::CollectionAccessDetailsResponseModelListResponseModel,
69 Error<GetManyWithDetailsError>,
70 >;
71
72 async fn get_user(
74 &self,
75 ) -> Result<models::CollectionDetailsResponseModelListResponseModel, Error<GetUserError>>;
76
77 async fn get_users<'a>(
79 &self,
80 org_id: uuid::Uuid,
81 id: uuid::Uuid,
82 ) -> Result<Vec<models::SelectionReadOnlyResponseModel>, Error<GetUsersError>>;
83
84 async fn post<'a>(
86 &self,
87 org_id: uuid::Uuid,
88 create_collection_request_model: Option<models::CreateCollectionRequestModel>,
89 ) -> Result<models::CollectionResponseModel, Error<PostError>>;
90
91 async fn post_bulk_collection_access<'a>(
93 &self,
94 org_id: uuid::Uuid,
95 bulk_collection_access_request_model: Option<models::BulkCollectionAccessRequestModel>,
96 ) -> Result<(), Error<PostBulkCollectionAccessError>>;
97
98 async fn put<'a>(
100 &self,
101 org_id: uuid::Uuid,
102 id: uuid::Uuid,
103 update_collection_request_model: Option<models::UpdateCollectionRequestModel>,
104 ) -> Result<models::CollectionResponseModel, Error<PutError>>;
105}
106
107pub struct CollectionsApiClient {
108 configuration: Arc<configuration::Configuration>,
109}
110
111impl CollectionsApiClient {
112 pub fn new(configuration: Arc<configuration::Configuration>) -> Self {
113 Self { configuration }
114 }
115}
116
117#[cfg_attr(target_arch = "wasm32", async_trait(?Send))]
118#[cfg_attr(not(target_arch = "wasm32"), async_trait)]
119impl CollectionsApi for CollectionsApiClient {
120 async fn delete<'a>(
121 &self,
122 org_id: uuid::Uuid,
123 id: uuid::Uuid,
124 ) -> Result<(), Error<DeleteError>> {
125 let local_var_configuration = &self.configuration;
126
127 let local_var_client = &local_var_configuration.client;
128
129 let local_var_uri_str = format!(
130 "{}/organizations/{orgId}/collections/{id}",
131 local_var_configuration.base_path,
132 orgId = org_id,
133 id = id
134 );
135 let mut local_var_req_builder =
136 local_var_client.request(reqwest::Method::DELETE, local_var_uri_str.as_str());
137
138 local_var_req_builder = local_var_req_builder.with_extension(AuthRequired::Bearer);
139
140 let local_var_resp = local_var_req_builder.send().await?;
141
142 let local_var_status = local_var_resp.status();
143 let local_var_content = local_var_resp.text().await?;
144
145 if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
146 Ok(())
147 } else {
148 let local_var_entity: Option<DeleteError> =
149 serde_json::from_str(&local_var_content).ok();
150 let local_var_error = ResponseContent {
151 status: local_var_status,
152 content: local_var_content,
153 entity: local_var_entity,
154 };
155 Err(Error::ResponseError(local_var_error))
156 }
157 }
158
159 async fn delete_many<'a>(
160 &self,
161 org_id: uuid::Uuid,
162 collection_bulk_delete_request_model: Option<models::CollectionBulkDeleteRequestModel>,
163 ) -> Result<(), Error<DeleteManyError>> {
164 let local_var_configuration = &self.configuration;
165
166 let local_var_client = &local_var_configuration.client;
167
168 let local_var_uri_str = format!(
169 "{}/organizations/{orgId}/collections",
170 local_var_configuration.base_path,
171 orgId = org_id
172 );
173 let mut local_var_req_builder =
174 local_var_client.request(reqwest::Method::DELETE, local_var_uri_str.as_str());
175
176 local_var_req_builder = local_var_req_builder.with_extension(AuthRequired::Bearer);
177 local_var_req_builder = local_var_req_builder.json(&collection_bulk_delete_request_model);
178
179 let local_var_resp = local_var_req_builder.send().await?;
180
181 let local_var_status = local_var_resp.status();
182 let local_var_content = local_var_resp.text().await?;
183
184 if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
185 Ok(())
186 } else {
187 let local_var_entity: Option<DeleteManyError> =
188 serde_json::from_str(&local_var_content).ok();
189 let local_var_error = ResponseContent {
190 status: local_var_status,
191 content: local_var_content,
192 entity: local_var_entity,
193 };
194 Err(Error::ResponseError(local_var_error))
195 }
196 }
197
198 async fn get<'a>(
199 &self,
200 org_id: uuid::Uuid,
201 id: uuid::Uuid,
202 ) -> Result<models::CollectionResponseModel, Error<GetError>> {
203 let local_var_configuration = &self.configuration;
204
205 let local_var_client = &local_var_configuration.client;
206
207 let local_var_uri_str = format!(
208 "{}/organizations/{orgId}/collections/{id}",
209 local_var_configuration.base_path,
210 orgId = org_id,
211 id = id
212 );
213 let mut local_var_req_builder =
214 local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str());
215
216 local_var_req_builder = local_var_req_builder.with_extension(AuthRequired::Bearer);
217
218 let local_var_resp = local_var_req_builder.send().await?;
219
220 let local_var_status = local_var_resp.status();
221 let local_var_content_type = local_var_resp
222 .headers()
223 .get("content-type")
224 .and_then(|v| v.to_str().ok())
225 .unwrap_or("application/octet-stream");
226 let local_var_content_type = super::ContentType::from(local_var_content_type);
227 let local_var_content = local_var_resp.text().await?;
228
229 if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
230 match local_var_content_type {
231 ContentType::Json => serde_json::from_str(&local_var_content).map_err(Error::from),
232 ContentType::Text => {
233 return Err(Error::from(serde_json::Error::custom(
234 "Received `text/plain` content type response that cannot be converted to `models::CollectionResponseModel`",
235 )));
236 }
237 ContentType::Unsupported(local_var_unknown_type) => {
238 return Err(Error::from(serde_json::Error::custom(format!(
239 "Received `{local_var_unknown_type}` content type response that cannot be converted to `models::CollectionResponseModel`"
240 ))));
241 }
242 }
243 } else {
244 let local_var_entity: Option<GetError> = serde_json::from_str(&local_var_content).ok();
245 let local_var_error = ResponseContent {
246 status: local_var_status,
247 content: local_var_content,
248 entity: local_var_entity,
249 };
250 Err(Error::ResponseError(local_var_error))
251 }
252 }
253
254 async fn get_all<'a>(
255 &self,
256 org_id: uuid::Uuid,
257 ) -> Result<models::CollectionResponseModelListResponseModel, Error<GetAllError>> {
258 let local_var_configuration = &self.configuration;
259
260 let local_var_client = &local_var_configuration.client;
261
262 let local_var_uri_str = format!(
263 "{}/organizations/{orgId}/collections",
264 local_var_configuration.base_path,
265 orgId = org_id
266 );
267 let mut local_var_req_builder =
268 local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str());
269
270 local_var_req_builder = local_var_req_builder.with_extension(AuthRequired::Bearer);
271
272 let local_var_resp = local_var_req_builder.send().await?;
273
274 let local_var_status = local_var_resp.status();
275 let local_var_content_type = local_var_resp
276 .headers()
277 .get("content-type")
278 .and_then(|v| v.to_str().ok())
279 .unwrap_or("application/octet-stream");
280 let local_var_content_type = super::ContentType::from(local_var_content_type);
281 let local_var_content = local_var_resp.text().await?;
282
283 if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
284 match local_var_content_type {
285 ContentType::Json => serde_json::from_str(&local_var_content).map_err(Error::from),
286 ContentType::Text => {
287 return Err(Error::from(serde_json::Error::custom(
288 "Received `text/plain` content type response that cannot be converted to `models::CollectionResponseModelListResponseModel`",
289 )));
290 }
291 ContentType::Unsupported(local_var_unknown_type) => {
292 return Err(Error::from(serde_json::Error::custom(format!(
293 "Received `{local_var_unknown_type}` content type response that cannot be converted to `models::CollectionResponseModelListResponseModel`"
294 ))));
295 }
296 }
297 } else {
298 let local_var_entity: Option<GetAllError> =
299 serde_json::from_str(&local_var_content).ok();
300 let local_var_error = ResponseContent {
301 status: local_var_status,
302 content: local_var_content,
303 entity: local_var_entity,
304 };
305 Err(Error::ResponseError(local_var_error))
306 }
307 }
308
309 async fn get_details<'a>(
310 &self,
311 org_id: uuid::Uuid,
312 id: uuid::Uuid,
313 ) -> Result<models::CollectionAccessDetailsResponseModel, Error<GetDetailsError>> {
314 let local_var_configuration = &self.configuration;
315
316 let local_var_client = &local_var_configuration.client;
317
318 let local_var_uri_str = format!(
319 "{}/organizations/{orgId}/collections/{id}/details",
320 local_var_configuration.base_path,
321 orgId = org_id,
322 id = id
323 );
324 let mut local_var_req_builder =
325 local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str());
326
327 local_var_req_builder = local_var_req_builder.with_extension(AuthRequired::Bearer);
328
329 let local_var_resp = local_var_req_builder.send().await?;
330
331 let local_var_status = local_var_resp.status();
332 let local_var_content_type = local_var_resp
333 .headers()
334 .get("content-type")
335 .and_then(|v| v.to_str().ok())
336 .unwrap_or("application/octet-stream");
337 let local_var_content_type = super::ContentType::from(local_var_content_type);
338 let local_var_content = local_var_resp.text().await?;
339
340 if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
341 match local_var_content_type {
342 ContentType::Json => serde_json::from_str(&local_var_content).map_err(Error::from),
343 ContentType::Text => {
344 return Err(Error::from(serde_json::Error::custom(
345 "Received `text/plain` content type response that cannot be converted to `models::CollectionAccessDetailsResponseModel`",
346 )));
347 }
348 ContentType::Unsupported(local_var_unknown_type) => {
349 return Err(Error::from(serde_json::Error::custom(format!(
350 "Received `{local_var_unknown_type}` content type response that cannot be converted to `models::CollectionAccessDetailsResponseModel`"
351 ))));
352 }
353 }
354 } else {
355 let local_var_entity: Option<GetDetailsError> =
356 serde_json::from_str(&local_var_content).ok();
357 let local_var_error = ResponseContent {
358 status: local_var_status,
359 content: local_var_content,
360 entity: local_var_entity,
361 };
362 Err(Error::ResponseError(local_var_error))
363 }
364 }
365
366 async fn get_many_with_details<'a>(
367 &self,
368 org_id: uuid::Uuid,
369 ) -> Result<
370 models::CollectionAccessDetailsResponseModelListResponseModel,
371 Error<GetManyWithDetailsError>,
372 > {
373 let local_var_configuration = &self.configuration;
374
375 let local_var_client = &local_var_configuration.client;
376
377 let local_var_uri_str = format!(
378 "{}/organizations/{orgId}/collections/details",
379 local_var_configuration.base_path,
380 orgId = org_id
381 );
382 let mut local_var_req_builder =
383 local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str());
384
385 local_var_req_builder = local_var_req_builder.with_extension(AuthRequired::Bearer);
386
387 let local_var_resp = local_var_req_builder.send().await?;
388
389 let local_var_status = local_var_resp.status();
390 let local_var_content_type = local_var_resp
391 .headers()
392 .get("content-type")
393 .and_then(|v| v.to_str().ok())
394 .unwrap_or("application/octet-stream");
395 let local_var_content_type = super::ContentType::from(local_var_content_type);
396 let local_var_content = local_var_resp.text().await?;
397
398 if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
399 match local_var_content_type {
400 ContentType::Json => serde_json::from_str(&local_var_content).map_err(Error::from),
401 ContentType::Text => {
402 return Err(Error::from(serde_json::Error::custom(
403 "Received `text/plain` content type response that cannot be converted to `models::CollectionAccessDetailsResponseModelListResponseModel`",
404 )));
405 }
406 ContentType::Unsupported(local_var_unknown_type) => {
407 return Err(Error::from(serde_json::Error::custom(format!(
408 "Received `{local_var_unknown_type}` content type response that cannot be converted to `models::CollectionAccessDetailsResponseModelListResponseModel`"
409 ))));
410 }
411 }
412 } else {
413 let local_var_entity: Option<GetManyWithDetailsError> =
414 serde_json::from_str(&local_var_content).ok();
415 let local_var_error = ResponseContent {
416 status: local_var_status,
417 content: local_var_content,
418 entity: local_var_entity,
419 };
420 Err(Error::ResponseError(local_var_error))
421 }
422 }
423
424 async fn get_user(
425 &self,
426 ) -> Result<models::CollectionDetailsResponseModelListResponseModel, Error<GetUserError>> {
427 let local_var_configuration = &self.configuration;
428
429 let local_var_client = &local_var_configuration.client;
430
431 let local_var_uri_str = format!("{}/collections", local_var_configuration.base_path);
432 let mut local_var_req_builder =
433 local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str());
434
435 local_var_req_builder = local_var_req_builder.with_extension(AuthRequired::Bearer);
436
437 let local_var_resp = local_var_req_builder.send().await?;
438
439 let local_var_status = local_var_resp.status();
440 let local_var_content_type = local_var_resp
441 .headers()
442 .get("content-type")
443 .and_then(|v| v.to_str().ok())
444 .unwrap_or("application/octet-stream");
445 let local_var_content_type = super::ContentType::from(local_var_content_type);
446 let local_var_content = local_var_resp.text().await?;
447
448 if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
449 match local_var_content_type {
450 ContentType::Json => serde_json::from_str(&local_var_content).map_err(Error::from),
451 ContentType::Text => {
452 return Err(Error::from(serde_json::Error::custom(
453 "Received `text/plain` content type response that cannot be converted to `models::CollectionDetailsResponseModelListResponseModel`",
454 )));
455 }
456 ContentType::Unsupported(local_var_unknown_type) => {
457 return Err(Error::from(serde_json::Error::custom(format!(
458 "Received `{local_var_unknown_type}` content type response that cannot be converted to `models::CollectionDetailsResponseModelListResponseModel`"
459 ))));
460 }
461 }
462 } else {
463 let local_var_entity: Option<GetUserError> =
464 serde_json::from_str(&local_var_content).ok();
465 let local_var_error = ResponseContent {
466 status: local_var_status,
467 content: local_var_content,
468 entity: local_var_entity,
469 };
470 Err(Error::ResponseError(local_var_error))
471 }
472 }
473
474 async fn get_users<'a>(
475 &self,
476 org_id: uuid::Uuid,
477 id: uuid::Uuid,
478 ) -> Result<Vec<models::SelectionReadOnlyResponseModel>, Error<GetUsersError>> {
479 let local_var_configuration = &self.configuration;
480
481 let local_var_client = &local_var_configuration.client;
482
483 let local_var_uri_str = format!(
484 "{}/organizations/{orgId}/collections/{id}/users",
485 local_var_configuration.base_path,
486 orgId = org_id,
487 id = id
488 );
489 let mut local_var_req_builder =
490 local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str());
491
492 local_var_req_builder = local_var_req_builder.with_extension(AuthRequired::Bearer);
493
494 let local_var_resp = local_var_req_builder.send().await?;
495
496 let local_var_status = local_var_resp.status();
497 let local_var_content_type = local_var_resp
498 .headers()
499 .get("content-type")
500 .and_then(|v| v.to_str().ok())
501 .unwrap_or("application/octet-stream");
502 let local_var_content_type = super::ContentType::from(local_var_content_type);
503 let local_var_content = local_var_resp.text().await?;
504
505 if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
506 match local_var_content_type {
507 ContentType::Json => serde_json::from_str(&local_var_content).map_err(Error::from),
508 ContentType::Text => {
509 return Err(Error::from(serde_json::Error::custom(
510 "Received `text/plain` content type response that cannot be converted to `Vec<models::SelectionReadOnlyResponseModel>`",
511 )));
512 }
513 ContentType::Unsupported(local_var_unknown_type) => {
514 return Err(Error::from(serde_json::Error::custom(format!(
515 "Received `{local_var_unknown_type}` content type response that cannot be converted to `Vec<models::SelectionReadOnlyResponseModel>`"
516 ))));
517 }
518 }
519 } else {
520 let local_var_entity: Option<GetUsersError> =
521 serde_json::from_str(&local_var_content).ok();
522 let local_var_error = ResponseContent {
523 status: local_var_status,
524 content: local_var_content,
525 entity: local_var_entity,
526 };
527 Err(Error::ResponseError(local_var_error))
528 }
529 }
530
531 async fn post<'a>(
532 &self,
533 org_id: uuid::Uuid,
534 create_collection_request_model: Option<models::CreateCollectionRequestModel>,
535 ) -> Result<models::CollectionResponseModel, Error<PostError>> {
536 let local_var_configuration = &self.configuration;
537
538 let local_var_client = &local_var_configuration.client;
539
540 let local_var_uri_str = format!(
541 "{}/organizations/{orgId}/collections",
542 local_var_configuration.base_path,
543 orgId = org_id
544 );
545 let mut local_var_req_builder =
546 local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str());
547
548 local_var_req_builder = local_var_req_builder.with_extension(AuthRequired::Bearer);
549 local_var_req_builder = local_var_req_builder.json(&create_collection_request_model);
550
551 let local_var_resp = local_var_req_builder.send().await?;
552
553 let local_var_status = local_var_resp.status();
554 let local_var_content_type = local_var_resp
555 .headers()
556 .get("content-type")
557 .and_then(|v| v.to_str().ok())
558 .unwrap_or("application/octet-stream");
559 let local_var_content_type = super::ContentType::from(local_var_content_type);
560 let local_var_content = local_var_resp.text().await?;
561
562 if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
563 match local_var_content_type {
564 ContentType::Json => serde_json::from_str(&local_var_content).map_err(Error::from),
565 ContentType::Text => {
566 return Err(Error::from(serde_json::Error::custom(
567 "Received `text/plain` content type response that cannot be converted to `models::CollectionResponseModel`",
568 )));
569 }
570 ContentType::Unsupported(local_var_unknown_type) => {
571 return Err(Error::from(serde_json::Error::custom(format!(
572 "Received `{local_var_unknown_type}` content type response that cannot be converted to `models::CollectionResponseModel`"
573 ))));
574 }
575 }
576 } else {
577 let local_var_entity: Option<PostError> = serde_json::from_str(&local_var_content).ok();
578 let local_var_error = ResponseContent {
579 status: local_var_status,
580 content: local_var_content,
581 entity: local_var_entity,
582 };
583 Err(Error::ResponseError(local_var_error))
584 }
585 }
586
587 async fn post_bulk_collection_access<'a>(
588 &self,
589 org_id: uuid::Uuid,
590 bulk_collection_access_request_model: Option<models::BulkCollectionAccessRequestModel>,
591 ) -> Result<(), Error<PostBulkCollectionAccessError>> {
592 let local_var_configuration = &self.configuration;
593
594 let local_var_client = &local_var_configuration.client;
595
596 let local_var_uri_str = format!(
597 "{}/organizations/{orgId}/collections/bulk-access",
598 local_var_configuration.base_path,
599 orgId = org_id
600 );
601 let mut local_var_req_builder =
602 local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str());
603
604 local_var_req_builder = local_var_req_builder.with_extension(AuthRequired::Bearer);
605 local_var_req_builder = local_var_req_builder.json(&bulk_collection_access_request_model);
606
607 let local_var_resp = local_var_req_builder.send().await?;
608
609 let local_var_status = local_var_resp.status();
610 let local_var_content = local_var_resp.text().await?;
611
612 if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
613 Ok(())
614 } else {
615 let local_var_entity: Option<PostBulkCollectionAccessError> =
616 serde_json::from_str(&local_var_content).ok();
617 let local_var_error = ResponseContent {
618 status: local_var_status,
619 content: local_var_content,
620 entity: local_var_entity,
621 };
622 Err(Error::ResponseError(local_var_error))
623 }
624 }
625
626 async fn put<'a>(
627 &self,
628 org_id: uuid::Uuid,
629 id: uuid::Uuid,
630 update_collection_request_model: Option<models::UpdateCollectionRequestModel>,
631 ) -> Result<models::CollectionResponseModel, Error<PutError>> {
632 let local_var_configuration = &self.configuration;
633
634 let local_var_client = &local_var_configuration.client;
635
636 let local_var_uri_str = format!(
637 "{}/organizations/{orgId}/collections/{id}",
638 local_var_configuration.base_path,
639 orgId = org_id,
640 id = id
641 );
642 let mut local_var_req_builder =
643 local_var_client.request(reqwest::Method::PUT, local_var_uri_str.as_str());
644
645 local_var_req_builder = local_var_req_builder.with_extension(AuthRequired::Bearer);
646 local_var_req_builder = local_var_req_builder.json(&update_collection_request_model);
647
648 let local_var_resp = local_var_req_builder.send().await?;
649
650 let local_var_status = local_var_resp.status();
651 let local_var_content_type = local_var_resp
652 .headers()
653 .get("content-type")
654 .and_then(|v| v.to_str().ok())
655 .unwrap_or("application/octet-stream");
656 let local_var_content_type = super::ContentType::from(local_var_content_type);
657 let local_var_content = local_var_resp.text().await?;
658
659 if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
660 match local_var_content_type {
661 ContentType::Json => serde_json::from_str(&local_var_content).map_err(Error::from),
662 ContentType::Text => {
663 return Err(Error::from(serde_json::Error::custom(
664 "Received `text/plain` content type response that cannot be converted to `models::CollectionResponseModel`",
665 )));
666 }
667 ContentType::Unsupported(local_var_unknown_type) => {
668 return Err(Error::from(serde_json::Error::custom(format!(
669 "Received `{local_var_unknown_type}` content type response that cannot be converted to `models::CollectionResponseModel`"
670 ))));
671 }
672 }
673 } else {
674 let local_var_entity: Option<PutError> = serde_json::from_str(&local_var_content).ok();
675 let local_var_error = ResponseContent {
676 status: local_var_status,
677 content: local_var_content,
678 entity: local_var_entity,
679 };
680 Err(Error::ResponseError(local_var_error))
681 }
682 }
683}
684
685#[derive(Debug, Clone, Serialize, Deserialize)]
687#[serde(untagged)]
688pub enum DeleteError {
689 UnknownValue(serde_json::Value),
690}
691#[derive(Debug, Clone, Serialize, Deserialize)]
693#[serde(untagged)]
694pub enum DeleteManyError {
695 UnknownValue(serde_json::Value),
696}
697#[derive(Debug, Clone, Serialize, Deserialize)]
699#[serde(untagged)]
700pub enum GetError {
701 UnknownValue(serde_json::Value),
702}
703#[derive(Debug, Clone, Serialize, Deserialize)]
705#[serde(untagged)]
706pub enum GetAllError {
707 UnknownValue(serde_json::Value),
708}
709#[derive(Debug, Clone, Serialize, Deserialize)]
711#[serde(untagged)]
712pub enum GetDetailsError {
713 UnknownValue(serde_json::Value),
714}
715#[derive(Debug, Clone, Serialize, Deserialize)]
717#[serde(untagged)]
718pub enum GetManyWithDetailsError {
719 UnknownValue(serde_json::Value),
720}
721#[derive(Debug, Clone, Serialize, Deserialize)]
723#[serde(untagged)]
724pub enum GetUserError {
725 UnknownValue(serde_json::Value),
726}
727#[derive(Debug, Clone, Serialize, Deserialize)]
729#[serde(untagged)]
730pub enum GetUsersError {
731 UnknownValue(serde_json::Value),
732}
733#[derive(Debug, Clone, Serialize, Deserialize)]
735#[serde(untagged)]
736pub enum PostError {
737 UnknownValue(serde_json::Value),
738}
739#[derive(Debug, Clone, Serialize, Deserialize)]
741#[serde(untagged)]
742pub enum PostBulkCollectionAccessError {
743 UnknownValue(serde_json::Value),
744}
745#[derive(Debug, Clone, Serialize, Deserialize)]
747#[serde(untagged)]
748pub enum PutError {
749 UnknownValue(serde_json::Value),
750}