aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBryan Newbold <bnewbold@archive.org>2022-08-11 19:39:44 -0700
committerBryan Newbold <bnewbold@archive.org>2022-08-11 19:39:47 -0700
commitf2179cc9071c4e95c307f7506e764ada9f484052 (patch)
treeb51d83986e91fddb2ad245003c87407ecbdcc563
parent7392e457fae4d9f7b3dfa79dccfdaf23d6f9d1a5 (diff)
downloadfatcat-cli-f2179cc9071c4e95c307f7506e764ada9f484052.tar.gz
fatcat-cli-f2179cc9071c4e95c307f7506e764ada9f484052.zip
re-codegen fatcat-openapi module
this includes manual reconsiliation of cargo deps (Cargo.toml)
-rw-r--r--fatcat-openapi/Cargo.toml13
-rw-r--r--fatcat-openapi/README.md4
-rw-r--r--fatcat-openapi/examples/server/server.rs216
-rw-r--r--fatcat-openapi/src/client/mod.rs3043
-rw-r--r--fatcat-openapi/src/context.rs6
-rw-r--r--fatcat-openapi/src/lib.rs193
-rw-r--r--fatcat-openapi/src/models.rs1817
-rw-r--r--fatcat-openapi/src/server/mod.rs254
8 files changed, 3329 insertions, 2217 deletions
diff --git a/fatcat-openapi/Cargo.toml b/fatcat-openapi/Cargo.toml
index 0595501..000796e 100644
--- a/fatcat-openapi/Cargo.toml
+++ b/fatcat-openapi/Cargo.toml
@@ -20,10 +20,10 @@ conversion = ["frunk", "frunk_derives", "frunk_core", "frunk-enum-core", "frunk-
[target.'cfg(any(target_os = "macos", target_os = "windows", target_os = "ios"))'.dependencies]
native-tls = { version = "0.2", optional = true }
-hyper-tls = { version = "0.4", optional = true }
+hyper-tls = { version = "0.5", optional = true }
[target.'cfg(not(any(target_os = "macos", target_os = "windows", target_os = "ios")))'.dependencies]
-hyper-openssl = { version = "0.8", optional = true }
+hyper-openssl = { version = "0.9", optional = true }
openssl = {version = "0.10", optional = true }
[dependencies]
@@ -31,7 +31,7 @@ openssl = {version = "0.10", optional = true }
async-trait = "0.1.24"
chrono = { version = "0.4", features = ["serde"] }
futures = "0.3"
-swagger = "5.0.2"
+swagger = { version = "6.1", features = ["serdejson", "server", "client", "tls", "tcp"] }
log = "0.4.0"
mime = "0.3"
@@ -41,7 +41,7 @@ serde_json = "1.0"
# Crates included if required by the API definition
# Common between server and client features
-hyper = {version = "0.13", optional = true}
+hyper = {version = "0.14", features = ["full"], optional = true}
serde_ignored = {version = "0.1.1", optional = true}
url = {version = "2.1", optional = true}
@@ -62,12 +62,11 @@ frunk-enum-core = { version = "0.2.0", optional = true }
[dev-dependencies]
clap = "2.25"
env_logger = "0.7"
-tokio = { version = "0.2", features = ["rt-threaded", "macros", "stream"] }
+tokio = { version = "1.14", features = ["full"] }
native-tls = "0.2"
-tokio-tls = "0.3"
[target.'cfg(not(any(target_os = "macos", target_os = "windows", target_os = "ios")))'.dev-dependencies]
-tokio-openssl = "0.4"
+tokio-openssl = "0.6"
openssl = "0.10"
[[example]]
diff --git a/fatcat-openapi/README.md b/fatcat-openapi/README.md
index a958a22..35e8c51 100644
--- a/fatcat-openapi/README.md
+++ b/fatcat-openapi/README.md
@@ -16,7 +16,7 @@ To see how to make this your own, look here:
[README]((https://openapi-generator.tech))
- API version: 0.5.0
-- Build date: 2021-11-17T17:39:00.363443-08:00[America/Los_Angeles]
+- Build date: 2022-08-11T18:55:07.889780-07:00[America/Los_Angeles]
For more information, please visit [https://fatcat.wiki](https://fatcat.wiki)
@@ -306,7 +306,7 @@ Method | HTTP request | Description
## Documentation For Authorization
## Bearer
-- **Type**: HTTP basic authentication
+- **Type**: Bearer token authentication
Example
```
diff --git a/fatcat-openapi/examples/server/server.rs b/fatcat-openapi/examples/server/server.rs
index d09b080..c844de7 100644
--- a/fatcat-openapi/examples/server/server.rs
+++ b/fatcat-openapi/examples/server/server.rs
@@ -7,8 +7,6 @@ use futures::{future, Stream, StreamExt, TryFutureExt, TryStreamExt};
use hyper::server::conn::Http;
use hyper::service::Service;
use log::info;
-#[cfg(not(any(target_os = "macos", target_os = "windows", target_os = "ios")))]
-use openssl::ssl::SslAcceptorBuilder;
use std::future::Future;
use std::marker::PhantomData;
use std::net::SocketAddr;
@@ -20,7 +18,7 @@ use swagger::{Has, XSpanIdString};
use tokio::net::TcpListener;
#[cfg(not(any(target_os = "macos", target_os = "windows", target_os = "ios")))]
-use openssl::ssl::{SslAcceptor, SslFiletype, SslMethod};
+use openssl::ssl::{Ssl, SslAcceptor, SslAcceptorBuilder, SslFiletype, SslMethod};
use fatcat_openapi::models;
@@ -52,25 +50,21 @@ pub async fn create(addr: &str, https: bool) {
ssl.set_private_key_file("examples/server-key.pem", SslFiletype::PEM)
.expect("Failed to set private key");
ssl.set_certificate_chain_file("examples/server-chain.pem")
- .expect("Failed to set cerificate chain");
+ .expect("Failed to set certificate chain");
ssl.check_private_key()
.expect("Failed to check private key");
- let tls_acceptor = Arc::new(ssl.build());
- let mut tcp_listener = TcpListener::bind(&addr).await.unwrap();
- let mut incoming = tcp_listener.incoming();
+ let tls_acceptor = ssl.build();
+ let tcp_listener = TcpListener::bind(&addr).await.unwrap();
- while let (Some(tcp), rest) = incoming.into_future().await {
- if let Ok(tcp) = tcp {
+ loop {
+ if let Ok((tcp, _)) = tcp_listener.accept().await {
+ let ssl = Ssl::new(tls_acceptor.context()).unwrap();
let addr = tcp.peer_addr().expect("Unable to get remote address");
let service = service.call(addr);
- let tls_acceptor = Arc::clone(&tls_acceptor);
tokio::spawn(async move {
- let tls = tokio_openssl::accept(&*tls_acceptor, tcp)
- .await
- .map_err(|_| ())?;
-
+ let tls = tokio_openssl::SslStream::new(ssl, tcp).map_err(|_| ())?;
let service = service.await.map_err(|_| ())?;
Http::new()
@@ -79,8 +73,6 @@ pub async fn create(addr: &str, https: bool) {
.map_err(|_| ())
});
}
-
- incoming = rest;
}
}
} else {
@@ -156,7 +148,7 @@ where
editgroup_id,
context.get().0.clone()
);
- Err("Generic failuare".into())
+ Err(ApiError("Generic failure".into()))
}
async fn auth_check(
@@ -170,7 +162,7 @@ where
role,
context.get().0.clone()
);
- Err("Generic failuare".into())
+ Err(ApiError("Generic failure".into()))
}
async fn auth_oidc(
@@ -184,7 +176,7 @@ where
auth_oidc,
context.get().0.clone()
);
- Err("Generic failuare".into())
+ Err(ApiError("Generic failure".into()))
}
async fn create_auth_token(
@@ -200,7 +192,7 @@ where
duration_seconds,
context.get().0.clone()
);
- Err("Generic failuare".into())
+ Err(ApiError("Generic failure".into()))
}
async fn create_container(
@@ -216,7 +208,7 @@ where
container_entity,
context.get().0.clone()
);
- Err("Generic failuare".into())
+ Err(ApiError("Generic failure".into()))
}
async fn create_container_auto_batch(
@@ -230,7 +222,7 @@ where
container_auto_batch,
context.get().0.clone()
);
- Err("Generic failuare".into())
+ Err(ApiError("Generic failure".into()))
}
async fn create_creator(
@@ -246,7 +238,7 @@ where
creator_entity,
context.get().0.clone()
);
- Err("Generic failuare".into())
+ Err(ApiError("Generic failure".into()))
}
async fn create_creator_auto_batch(
@@ -260,7 +252,7 @@ where
creator_auto_batch,
context.get().0.clone()
);
- Err("Generic failuare".into())
+ Err(ApiError("Generic failure".into()))
}
async fn create_editgroup(
@@ -274,7 +266,7 @@ where
editgroup,
context.get().0.clone()
);
- Err("Generic failuare".into())
+ Err(ApiError("Generic failure".into()))
}
async fn create_editgroup_annotation(
@@ -290,7 +282,7 @@ where
editgroup_annotation,
context.get().0.clone()
);
- Err("Generic failuare".into())
+ Err(ApiError("Generic failure".into()))
}
async fn create_file(
@@ -306,7 +298,7 @@ where
file_entity,
context.get().0.clone()
);
- Err("Generic failuare".into())
+ Err(ApiError("Generic failure".into()))
}
async fn create_file_auto_batch(
@@ -320,7 +312,7 @@ where
file_auto_batch,
context.get().0.clone()
);
- Err("Generic failuare".into())
+ Err(ApiError("Generic failure".into()))
}
async fn create_fileset(
@@ -336,7 +328,7 @@ where
fileset_entity,
context.get().0.clone()
);
- Err("Generic failuare".into())
+ Err(ApiError("Generic failure".into()))
}
async fn create_fileset_auto_batch(
@@ -350,7 +342,7 @@ where
fileset_auto_batch,
context.get().0.clone()
);
- Err("Generic failuare".into())
+ Err(ApiError("Generic failure".into()))
}
async fn create_release(
@@ -366,7 +358,7 @@ where
release_entity,
context.get().0.clone()
);
- Err("Generic failuare".into())
+ Err(ApiError("Generic failure".into()))
}
async fn create_release_auto_batch(
@@ -380,7 +372,7 @@ where
release_auto_batch,
context.get().0.clone()
);
- Err("Generic failuare".into())
+ Err(ApiError("Generic failure".into()))
}
async fn create_webcapture(
@@ -396,7 +388,7 @@ where
webcapture_entity,
context.get().0.clone()
);
- Err("Generic failuare".into())
+ Err(ApiError("Generic failure".into()))
}
async fn create_webcapture_auto_batch(
@@ -410,7 +402,7 @@ where
webcapture_auto_batch,
context.get().0.clone()
);
- Err("Generic failuare".into())
+ Err(ApiError("Generic failure".into()))
}
async fn create_work(
@@ -426,7 +418,7 @@ where
work_entity,
context.get().0.clone()
);
- Err("Generic failuare".into())
+ Err(ApiError("Generic failure".into()))
}
async fn create_work_auto_batch(
@@ -440,7 +432,7 @@ where
work_auto_batch,
context.get().0.clone()
);
- Err("Generic failuare".into())
+ Err(ApiError("Generic failure".into()))
}
async fn delete_container(
@@ -456,7 +448,7 @@ where
ident,
context.get().0.clone()
);
- Err("Generic failuare".into())
+ Err(ApiError("Generic failure".into()))
}
async fn delete_container_edit(
@@ -472,7 +464,7 @@ where
edit_id,
context.get().0.clone()
);
- Err("Generic failuare".into())
+ Err(ApiError("Generic failure".into()))
}
async fn delete_creator(
@@ -488,7 +480,7 @@ where
ident,
context.get().0.clone()
);
- Err("Generic failuare".into())
+ Err(ApiError("Generic failure".into()))
}
async fn delete_creator_edit(
@@ -504,7 +496,7 @@ where
edit_id,
context.get().0.clone()
);
- Err("Generic failuare".into())
+ Err(ApiError("Generic failure".into()))
}
async fn delete_file(
@@ -520,7 +512,7 @@ where
ident,
context.get().0.clone()
);
- Err("Generic failuare".into())
+ Err(ApiError("Generic failure".into()))
}
async fn delete_file_edit(
@@ -536,7 +528,7 @@ where
edit_id,
context.get().0.clone()
);
- Err("Generic failuare".into())
+ Err(ApiError("Generic failure".into()))
}
async fn delete_fileset(
@@ -552,7 +544,7 @@ where
ident,
context.get().0.clone()
);
- Err("Generic failuare".into())
+ Err(ApiError("Generic failure".into()))
}
async fn delete_fileset_edit(
@@ -568,7 +560,7 @@ where
edit_id,
context.get().0.clone()
);
- Err("Generic failuare".into())
+ Err(ApiError("Generic failure".into()))
}
async fn delete_release(
@@ -584,7 +576,7 @@ where
ident,
context.get().0.clone()
);
- Err("Generic failuare".into())
+ Err(ApiError("Generic failure".into()))
}
async fn delete_release_edit(
@@ -600,7 +592,7 @@ where
edit_id,
context.get().0.clone()
);
- Err("Generic failuare".into())
+ Err(ApiError("Generic failure".into()))
}
async fn delete_webcapture(
@@ -616,7 +608,7 @@ where
ident,
context.get().0.clone()
);
- Err("Generic failuare".into())
+ Err(ApiError("Generic failure".into()))
}
async fn delete_webcapture_edit(
@@ -632,7 +624,7 @@ where
edit_id,
context.get().0.clone()
);
- Err("Generic failuare".into())
+ Err(ApiError("Generic failure".into()))
}
async fn delete_work(
@@ -648,7 +640,7 @@ where
ident,
context.get().0.clone()
);
- Err("Generic failuare".into())
+ Err(ApiError("Generic failure".into()))
}
async fn delete_work_edit(
@@ -664,7 +656,7 @@ where
edit_id,
context.get().0.clone()
);
- Err("Generic failuare".into())
+ Err(ApiError("Generic failure".into()))
}
async fn get_changelog(
@@ -678,7 +670,7 @@ where
limit,
context.get().0.clone()
);
- Err("Generic failuare".into())
+ Err(ApiError("Generic failure".into()))
}
async fn get_changelog_entry(
@@ -692,7 +684,7 @@ where
index,
context.get().0.clone()
);
- Err("Generic failuare".into())
+ Err(ApiError("Generic failure".into()))
}
async fn get_container(
@@ -710,7 +702,7 @@ where
hide,
context.get().0.clone()
);
- Err("Generic failuare".into())
+ Err(ApiError("Generic failure".into()))
}
async fn get_container_edit(
@@ -724,7 +716,7 @@ where
edit_id,
context.get().0.clone()
);
- Err("Generic failuare".into())
+ Err(ApiError("Generic failure".into()))
}
async fn get_container_history(
@@ -740,7 +732,7 @@ where
limit,
context.get().0.clone()
);
- Err("Generic failuare".into())
+ Err(ApiError("Generic failure".into()))
}
async fn get_container_redirects(
@@ -754,7 +746,7 @@ where
ident,
context.get().0.clone()
);
- Err("Generic failuare".into())
+ Err(ApiError("Generic failure".into()))
}
async fn get_container_revision(
@@ -772,7 +764,7 @@ where
hide,
context.get().0.clone()
);
- Err("Generic failuare".into())
+ Err(ApiError("Generic failure".into()))
}
async fn get_creator(
@@ -790,7 +782,7 @@ where
hide,
context.get().0.clone()
);
- Err("Generic failuare".into())
+ Err(ApiError("Generic failure".into()))
}
async fn get_creator_edit(
@@ -804,7 +796,7 @@ where
edit_id,
context.get().0.clone()
);
- Err("Generic failuare".into())
+ Err(ApiError("Generic failure".into()))
}
async fn get_creator_history(
@@ -820,7 +812,7 @@ where
limit,
context.get().0.clone()
);
- Err("Generic failuare".into())
+ Err(ApiError("Generic failure".into()))
}
async fn get_creator_redirects(
@@ -834,7 +826,7 @@ where
ident,
context.get().0.clone()
);
- Err("Generic failuare".into())
+ Err(ApiError("Generic failure".into()))
}
async fn get_creator_releases(
@@ -850,7 +842,7 @@ where
hide,
context.get().0.clone()
);
- Err("Generic failuare".into())
+ Err(ApiError("Generic failure".into()))
}
async fn get_creator_revision(
@@ -868,7 +860,7 @@ where
hide,
context.get().0.clone()
);
- Err("Generic failuare".into())
+ Err(ApiError("Generic failure".into()))
}
async fn get_editgroup(
@@ -882,7 +874,7 @@ where
editgroup_id,
context.get().0.clone()
);
- Err("Generic failuare".into())
+ Err(ApiError("Generic failure".into()))
}
async fn get_editgroup_annotations(
@@ -898,7 +890,7 @@ where
expand,
context.get().0.clone()
);
- Err("Generic failuare".into())
+ Err(ApiError("Generic failure".into()))
}
async fn get_editgroups_reviewable(
@@ -918,7 +910,7 @@ where
since,
context.get().0.clone()
);
- Err("Generic failuare".into())
+ Err(ApiError("Generic failure".into()))
}
async fn get_editor(
@@ -932,7 +924,7 @@ where
editor_id,
context.get().0.clone()
);
- Err("Generic failuare".into())
+ Err(ApiError("Generic failure".into()))
}
async fn get_editor_annotations(
@@ -952,7 +944,7 @@ where
since,
context.get().0.clone()
);
- Err("Generic failuare".into())
+ Err(ApiError("Generic failure".into()))
}
async fn get_editor_editgroups(
@@ -972,7 +964,7 @@ where
since,
context.get().0.clone()
);
- Err("Generic failuare".into())
+ Err(ApiError("Generic failure".into()))
}
async fn get_file(
@@ -990,7 +982,7 @@ where
hide,
context.get().0.clone()
);
- Err("Generic failuare".into())
+ Err(ApiError("Generic failure".into()))
}
async fn get_file_edit(
@@ -1004,7 +996,7 @@ where
edit_id,
context.get().0.clone()
);
- Err("Generic failuare".into())
+ Err(ApiError("Generic failure".into()))
}
async fn get_file_history(
@@ -1020,7 +1012,7 @@ where
limit,
context.get().0.clone()
);
- Err("Generic failuare".into())
+ Err(ApiError("Generic failure".into()))
}
async fn get_file_redirects(
@@ -1034,7 +1026,7 @@ where
ident,
context.get().0.clone()
);
- Err("Generic failuare".into())
+ Err(ApiError("Generic failure".into()))
}
async fn get_file_revision(
@@ -1052,7 +1044,7 @@ where
hide,
context.get().0.clone()
);
- Err("Generic failuare".into())
+ Err(ApiError("Generic failure".into()))
}
async fn get_fileset(
@@ -1070,7 +1062,7 @@ where
hide,
context.get().0.clone()
);
- Err("Generic failuare".into())
+ Err(ApiError("Generic failure".into()))
}
async fn get_fileset_edit(
@@ -1084,7 +1076,7 @@ where
edit_id,
context.get().0.clone()
);
- Err("Generic failuare".into())
+ Err(ApiError("Generic failure".into()))
}
async fn get_fileset_history(
@@ -1100,7 +1092,7 @@ where
limit,
context.get().0.clone()
);
- Err("Generic failuare".into())
+ Err(ApiError("Generic failure".into()))
}
async fn get_fileset_redirects(
@@ -1114,7 +1106,7 @@ where
ident,
context.get().0.clone()
);
- Err("Generic failuare".into())
+ Err(ApiError("Generic failure".into()))
}
async fn get_fileset_revision(
@@ -1132,7 +1124,7 @@ where
hide,
context.get().0.clone()
);
- Err("Generic failuare".into())
+ Err(ApiError("Generic failure".into()))
}
async fn get_release(
@@ -1150,7 +1142,7 @@ where
hide,
context.get().0.clone()
);
- Err("Generic failuare".into())
+ Err(ApiError("Generic failure".into()))
}
async fn get_release_edit(
@@ -1164,7 +1156,7 @@ where
edit_id,
context.get().0.clone()
);
- Err("Generic failuare".into())
+ Err(ApiError("Generic failure".into()))
}
async fn get_release_files(
@@ -1180,7 +1172,7 @@ where
hide,
context.get().0.clone()
);
- Err("Generic failuare".into())
+ Err(ApiError("Generic failure".into()))
}
async fn get_release_filesets(
@@ -1196,7 +1188,7 @@ where
hide,
context.get().0.clone()
);
- Err("Generic failuare".into())
+ Err(ApiError("Generic failure".into()))
}
async fn get_release_history(
@@ -1212,7 +1204,7 @@ where
limit,
context.get().0.clone()
);
- Err("Generic failuare".into())
+ Err(ApiError("Generic failure".into()))
}
async fn get_release_redirects(
@@ -1226,7 +1218,7 @@ where
ident,
context.get().0.clone()
);
- Err("Generic failuare".into())
+ Err(ApiError("Generic failure".into()))
}
async fn get_release_revision(
@@ -1244,7 +1236,7 @@ where
hide,
context.get().0.clone()
);
- Err("Generic failuare".into())
+ Err(ApiError("Generic failure".into()))
}
async fn get_release_webcaptures(
@@ -1260,7 +1252,7 @@ where
hide,
context.get().0.clone()
);
- Err("Generic failuare".into())
+ Err(ApiError("Generic failure".into()))
}
async fn get_webcapture(
@@ -1278,7 +1270,7 @@ where
hide,
context.get().0.clone()
);
- Err("Generic failuare".into())
+ Err(ApiError("Generic failure".into()))
}
async fn get_webcapture_edit(
@@ -1292,7 +1284,7 @@ where
edit_id,
context.get().0.clone()
);
- Err("Generic failuare".into())
+ Err(ApiError("Generic failure".into()))
}
async fn get_webcapture_history(
@@ -1308,7 +1300,7 @@ where
limit,
context.get().0.clone()
);
- Err("Generic failuare".into())
+ Err(ApiError("Generic failure".into()))
}
async fn get_webcapture_redirects(
@@ -1322,7 +1314,7 @@ where
ident,
context.get().0.clone()
);
- Err("Generic failuare".into())
+ Err(ApiError("Generic failure".into()))
}
async fn get_webcapture_revision(
@@ -1340,7 +1332,7 @@ where
hide,
context.get().0.clone()
);
- Err("Generic failuare".into())
+ Err(ApiError("Generic failure".into()))
}
async fn get_work(
@@ -1358,7 +1350,7 @@ where
hide,
context.get().0.clone()
);
- Err("Generic failuare".into())
+ Err(ApiError("Generic failure".into()))
}
async fn get_work_edit(
@@ -1372,7 +1364,7 @@ where
edit_id,
context.get().0.clone()
);
- Err("Generic failuare".into())
+ Err(ApiError("Generic failure".into()))
}
async fn get_work_history(
@@ -1388,7 +1380,7 @@ where
limit,
context.get().0.clone()
);
- Err("Generic failuare".into())
+ Err(ApiError("Generic failure".into()))
}
async fn get_work_redirects(
@@ -1402,7 +1394,7 @@ where
ident,
context.get().0.clone()
);
- Err("Generic failuare".into())
+ Err(ApiError("Generic failure".into()))
}
async fn get_work_releases(
@@ -1418,7 +1410,7 @@ where
hide,
context.get().0.clone()
);
- Err("Generic failuare".into())
+ Err(ApiError("Generic failure".into()))
}
async fn get_work_revision(
@@ -1436,7 +1428,7 @@ where
hide,
context.get().0.clone()
);
- Err("Generic failuare".into())
+ Err(ApiError("Generic failure".into()))
}
async fn lookup_container(
@@ -1462,7 +1454,7 @@ where
hide,
context.get().0.clone()
);
- Err("Generic failuare".into())
+ Err(ApiError("Generic failure".into()))
}
async fn lookup_creator(
@@ -1482,7 +1474,7 @@ where
hide,
context.get().0.clone()
);
- Err("Generic failuare".into())
+ Err(ApiError("Generic failure".into()))
}
async fn lookup_editor(
@@ -1496,7 +1488,7 @@ where
username,
context.get().0.clone()
);
- Err("Generic failuare".into())
+ Err(ApiError("Generic failure".into()))
}
async fn lookup_file(
@@ -1518,7 +1510,7 @@ where
hide,
context.get().0.clone()
);
- Err("Generic failuare".into())
+ Err(ApiError("Generic failure".into()))
}
async fn lookup_release(
@@ -1543,7 +1535,7 @@ where
) -> Result<LookupReleaseResponse, ApiError> {
let context = context.clone();
info!("lookup_release({:?}, {:?}, {:?}, {:?}, {:?}, {:?}, {:?}, {:?}, {:?}, {:?}, {:?}, {:?}, {:?}, {:?}, {:?}, {:?}) - X-Span-ID: {:?}", doi, wikidata_qid, isbn13, pmid, pmcid, core, arxiv, jstor, ark, mag, doaj, dblp, oai, hdl, expand, hide, context.get().0.clone());
- Err("Generic failuare".into())
+ Err(ApiError("Generic failure".into()))
}
async fn update_container(
@@ -1561,7 +1553,7 @@ where
container_entity,
context.get().0.clone()
);
- Err("Generic failuare".into())
+ Err(ApiError("Generic failure".into()))
}
async fn update_creator(
@@ -1579,7 +1571,7 @@ where
creator_entity,
context.get().0.clone()
);
- Err("Generic failuare".into())
+ Err(ApiError("Generic failure".into()))
}
async fn update_editgroup(
@@ -1597,7 +1589,7 @@ where
submit,
context.get().0.clone()
);
- Err("Generic failuare".into())
+ Err(ApiError("Generic failure".into()))
}
async fn update_editor(
@@ -1613,7 +1605,7 @@ where
editor,
context.get().0.clone()
);
- Err("Generic failuare".into())
+ Err(ApiError("Generic failure".into()))
}
async fn update_file(
@@ -1631,7 +1623,7 @@ where
file_entity,
context.get().0.clone()
);
- Err("Generic failuare".into())
+ Err(ApiError("Generic failure".into()))
}
async fn update_fileset(
@@ -1649,7 +1641,7 @@ where
fileset_entity,
context.get().0.clone()
);
- Err("Generic failuare".into())
+ Err(ApiError("Generic failure".into()))
}
async fn update_release(
@@ -1667,7 +1659,7 @@ where
release_entity,
context.get().0.clone()
);
- Err("Generic failuare".into())
+ Err(ApiError("Generic failure".into()))
}
async fn update_webcapture(
@@ -1685,7 +1677,7 @@ where
webcapture_entity,
context.get().0.clone()
);
- Err("Generic failuare".into())
+ Err(ApiError("Generic failure".into()))
}
async fn update_work(
@@ -1703,6 +1695,6 @@ where
work_entity,
context.get().0.clone()
);
- Err("Generic failuare".into())
+ Err(ApiError("Generic failure".into()))
}
}
diff --git a/fatcat-openapi/src/client/mod.rs b/fatcat-openapi/src/client/mod.rs
index 774f6ee..7a66638 100644
--- a/fatcat-openapi/src/client/mod.rs
+++ b/fatcat-openapi/src/client/mod.rs
@@ -504,23 +504,27 @@ where
200 => {
let body = response.into_body();
let body = body
- .to_raw()
+ .into_raw()
.map_err(|e| ApiError(format!("Failed to read response: {}", e)))
.await?;
let body = str::from_utf8(&body)
.map_err(|e| ApiError(format!("Response was not valid UTF8: {}", e)))?;
- let body = serde_json::from_str::<models::Success>(body)?;
+ let body = serde_json::from_str::<models::Success>(body).map_err(|e| {
+ ApiError(format!("Response body did not match the schema: {}", e))
+ })?;
Ok(AcceptEditgroupResponse::MergedSuccessfully(body))
}
400 => {
let body = response.into_body();
let body = body
- .to_raw()
+ .into_raw()
.map_err(|e| ApiError(format!("Failed to read response: {}", e)))
.await?;
let body = str::from_utf8(&body)
.map_err(|e| ApiError(format!("Response was not valid UTF8: {}", e)))?;
- let body = serde_json::from_str::<models::ErrorResponse>(body)?;
+ let body = serde_json::from_str::<models::ErrorResponse>(body).map_err(|e| {
+ ApiError(format!("Response body did not match the schema: {}", e))
+ })?;
Ok(AcceptEditgroupResponse::BadRequest(body))
}
401 => {
@@ -548,12 +552,14 @@ where
let body = response.into_body();
let body = body
- .to_raw()
+ .into_raw()
.map_err(|e| ApiError(format!("Failed to read response: {}", e)))
.await?;
let body = str::from_utf8(&body)
.map_err(|e| ApiError(format!("Response was not valid UTF8: {}", e)))?;
- let body = serde_json::from_str::<models::ErrorResponse>(body)?;
+ let body = serde_json::from_str::<models::ErrorResponse>(body).map_err(|e| {
+ ApiError(format!("Response body did not match the schema: {}", e))
+ })?;
Ok(AcceptEditgroupResponse::NotAuthorized {
body: body,
www_authenticate: response_www_authenticate,
@@ -562,50 +568,58 @@ where
403 => {
let body = response.into_body();
let body = body
- .to_raw()
+ .into_raw()
.map_err(|e| ApiError(format!("Failed to read response: {}", e)))
.await?;
let body = str::from_utf8(&body)
.map_err(|e| ApiError(format!("Response was not valid UTF8: {}", e)))?;
- let body = serde_json::from_str::<models::ErrorResponse>(body)?;
+ let body = serde_json::from_str::<models::ErrorResponse>(body).map_err(|e| {
+ ApiError(format!("Response body did not match the schema: {}", e))
+ })?;
Ok(AcceptEditgroupResponse::Forbidden(body))
}
404 => {
let body = response.into_body();
let body = body
- .to_raw()
+ .into_raw()
.map_err(|e| ApiError(format!("Failed to read response: {}", e)))
.await?;
let body = str::from_utf8(&body)
.map_err(|e| ApiError(format!("Response was not valid UTF8: {}", e)))?;
- let body = serde_json::from_str::<models::ErrorResponse>(body)?;
+ let body = serde_json::from_str::<models::ErrorResponse>(body).map_err(|e| {
+ ApiError(format!("Response body did not match the schema: {}", e))
+ })?;
Ok(AcceptEditgroupResponse::NotFound(body))
}
409 => {
let body = response.into_body();
let body = body
- .to_raw()
+ .into_raw()
.map_err(|e| ApiError(format!("Failed to read response: {}", e)))
.await?;
let body = str::from_utf8(&body)
.map_err(|e| ApiError(format!("Response was not valid UTF8: {}", e)))?;
- let body = serde_json::from_str::<models::ErrorResponse>(body)?;
+ let body = serde_json::from_str::<models::ErrorResponse>(body).map_err(|e| {
+ ApiError(format!("Response body did not match the schema: {}", e))
+ })?;
Ok(AcceptEditgroupResponse::EditConflict(body))
}
500 => {
let body = response.into_body();
let body = body
- .to_raw()
+ .into_raw()
.map_err(|e| ApiError(format!("Failed to read response: {}", e)))
.await?;
let body = str::from_utf8(&body)
.map_err(|e| ApiError(format!("Response was not valid UTF8: {}", e)))?;
- let body = serde_json::from_str::<models::ErrorResponse>(body)?;
+ let body = serde_json::from_str::<models::ErrorResponse>(body).map_err(|e| {
+ ApiError(format!("Response body did not match the schema: {}", e))
+ })?;
Ok(AcceptEditgroupResponse::GenericError(body))
}
code => {
let headers = response.headers().clone();
- let body = response.into_body().take(100).to_raw().await;
+ let body = response.into_body().take(100).into_raw().await;
Err(ApiError(format!(
"Unexpected response code {}:\n{:?}\n\n{}",
code,
@@ -708,23 +722,27 @@ where
200 => {
let body = response.into_body();
let body = body
- .to_raw()
+ .into_raw()
.map_err(|e| ApiError(format!("Failed to read response: {}", e)))
.await?;
let body = str::from_utf8(&body)
.map_err(|e| ApiError(format!("Response was not valid UTF8: {}", e)))?;
- let body = serde_json::from_str::<models::Success>(body)?;
+ let body = serde_json::from_str::<models::Success>(body).map_err(|e| {
+ ApiError(format!("Response body did not match the schema: {}", e))
+ })?;
Ok(AuthCheckResponse::Success(body))
}
400 => {
let body = response.into_body();
let body = body
- .to_raw()
+ .into_raw()
.map_err(|e| ApiError(format!("Failed to read response: {}", e)))
.await?;
let body = str::from_utf8(&body)
.map_err(|e| ApiError(format!("Response was not valid UTF8: {}", e)))?;
- let body = serde_json::from_str::<models::ErrorResponse>(body)?;
+ let body = serde_json::from_str::<models::ErrorResponse>(body).map_err(|e| {
+ ApiError(format!("Response body did not match the schema: {}", e))
+ })?;
Ok(AuthCheckResponse::BadRequest(body))
}
401 => {
@@ -752,12 +770,14 @@ where
let body = response.into_body();
let body = body
- .to_raw()
+ .into_raw()
.map_err(|e| ApiError(format!("Failed to read response: {}", e)))
.await?;
let body = str::from_utf8(&body)
.map_err(|e| ApiError(format!("Response was not valid UTF8: {}", e)))?;
- let body = serde_json::from_str::<models::ErrorResponse>(body)?;
+ let body = serde_json::from_str::<models::ErrorResponse>(body).map_err(|e| {
+ ApiError(format!("Response body did not match the schema: {}", e))
+ })?;
Ok(AuthCheckResponse::NotAuthorized {
body: body,
www_authenticate: response_www_authenticate,
@@ -766,28 +786,32 @@ where
403 => {
let body = response.into_body();
let body = body
- .to_raw()
+ .into_raw()
.map_err(|e| ApiError(format!("Failed to read response: {}", e)))
.await?;
let body = str::from_utf8(&body)
.map_err(|e| ApiError(format!("Response was not valid UTF8: {}", e)))?;
- let body = serde_json::from_str::<models::ErrorResponse>(body)?;
+ let body = serde_json::from_str::<models::ErrorResponse>(body).map_err(|e| {
+ ApiError(format!("Response body did not match the schema: {}", e))
+ })?;
Ok(AuthCheckResponse::Forbidden(body))
}
500 => {
let body = response.into_body();
let body = body
- .to_raw()
+ .into_raw()
.map_err(|e| ApiError(format!("Failed to read response: {}", e)))
.await?;
let body = str::from_utf8(&body)
.map_err(|e| ApiError(format!("Response was not valid UTF8: {}", e)))?;
- let body = serde_json::from_str::<models::ErrorResponse>(body)?;
+ let body = serde_json::from_str::<models::ErrorResponse>(body).map_err(|e| {
+ ApiError(format!("Response body did not match the schema: {}", e))
+ })?;
Ok(AuthCheckResponse::GenericError(body))
}
code => {
let headers = response.headers().clone();
- let body = response.into_body().take(100).to_raw().await;
+ let body = response.into_body().take(100).into_raw().await;
Err(ApiError(format!(
"Unexpected response code {}:\n{:?}\n\n{}",
code,
@@ -904,34 +928,40 @@ where
200 => {
let body = response.into_body();
let body = body
- .to_raw()
+ .into_raw()
.map_err(|e| ApiError(format!("Failed to read response: {}", e)))
.await?;
let body = str::from_utf8(&body)
.map_err(|e| ApiError(format!("Response was not valid UTF8: {}", e)))?;
- let body = serde_json::from_str::<models::AuthOidcResult>(body)?;
+ let body = serde_json::from_str::<models::AuthOidcResult>(body).map_err(|e| {
+ ApiError(format!("Response body did not match the schema: {}", e))
+ })?;
Ok(AuthOidcResponse::Found(body))
}
201 => {
let body = response.into_body();
let body = body
- .to_raw()
+ .into_raw()
.map_err(|e| ApiError(format!("Failed to read response: {}", e)))
.await?;
let body = str::from_utf8(&body)
.map_err(|e| ApiError(format!("Response was not valid UTF8: {}", e)))?;
- let body = serde_json::from_str::<models::AuthOidcResult>(body)?;
+ let body = serde_json::from_str::<models::AuthOidcResult>(body).map_err(|e| {
+ ApiError(format!("Response body did not match the schema: {}", e))
+ })?;
Ok(AuthOidcResponse::Created(body))
}
400 => {
let body = response.into_body();
let body = body
- .to_raw()
+ .into_raw()
.map_err(|e| ApiError(format!("Failed to read response: {}", e)))
.await?;
let body = str::from_utf8(&body)
.map_err(|e| ApiError(format!("Response was not valid UTF8: {}", e)))?;
- let body = serde_json::from_str::<models::ErrorResponse>(body)?;
+ let body = serde_json::from_str::<models::ErrorResponse>(body).map_err(|e| {
+ ApiError(format!("Response body did not match the schema: {}", e))
+ })?;
Ok(AuthOidcResponse::BadRequest(body))
}
401 => {
@@ -959,12 +989,14 @@ where
let body = response.into_body();
let body = body
- .to_raw()
+ .into_raw()
.map_err(|e| ApiError(format!("Failed to read response: {}", e)))
.await?;
let body = str::from_utf8(&body)
.map_err(|e| ApiError(format!("Response was not valid UTF8: {}", e)))?;
- let body = serde_json::from_str::<models::ErrorResponse>(body)?;
+ let body = serde_json::from_str::<models::ErrorResponse>(body).map_err(|e| {
+ ApiError(format!("Response body did not match the schema: {}", e))
+ })?;
Ok(AuthOidcResponse::NotAuthorized {
body: body,
www_authenticate: response_www_authenticate,
@@ -973,39 +1005,45 @@ where
403 => {
let body = response.into_body();
let body = body
- .to_raw()
+ .into_raw()
.map_err(|e| ApiError(format!("Failed to read response: {}", e)))
.await?;
let body = str::from_utf8(&body)
.map_err(|e| ApiError(format!("Response was not valid UTF8: {}", e)))?;
- let body = serde_json::from_str::<models::ErrorResponse>(body)?;
+ let body = serde_json::from_str::<models::ErrorResponse>(body).map_err(|e| {
+ ApiError(format!("Response body did not match the schema: {}", e))
+ })?;
Ok(AuthOidcResponse::Forbidden(body))
}
409 => {
let body = response.into_body();
let body = body
- .to_raw()
+ .into_raw()
.map_err(|e| ApiError(format!("Failed to read response: {}", e)))
.await?;
let body = str::from_utf8(&body)
.map_err(|e| ApiError(format!("Response was not valid UTF8: {}", e)))?;
- let body = serde_json::from_str::<models::ErrorResponse>(body)?;
+ let body = serde_json::from_str::<models::ErrorResponse>(body).map_err(|e| {
+ ApiError(format!("Response body did not match the schema: {}", e))
+ })?;
Ok(AuthOidcResponse::Conflict(body))
}
500 => {
let body = response.into_body();
let body = body
- .to_raw()
+ .into_raw()
.map_err(|e| ApiError(format!("Failed to read response: {}", e)))
.await?;
let body = str::from_utf8(&body)
.map_err(|e| ApiError(format!("Response was not valid UTF8: {}", e)))?;
- let body = serde_json::from_str::<models::ErrorResponse>(body)?;
+ let body = serde_json::from_str::<models::ErrorResponse>(body).map_err(|e| {
+ ApiError(format!("Response body did not match the schema: {}", e))
+ })?;
Ok(AuthOidcResponse::GenericError(body))
}
code => {
let headers = response.headers().clone();
- let body = response.into_body().take(100).to_raw().await;
+ let body = response.into_body().take(100).into_raw().await;
Err(ApiError(format!(
"Unexpected response code {}:\n{:?}\n\n{}",
code,
@@ -1113,23 +1151,27 @@ where
200 => {
let body = response.into_body();
let body = body
- .to_raw()
+ .into_raw()
.map_err(|e| ApiError(format!("Failed to read response: {}", e)))
.await?;
let body = str::from_utf8(&body)
.map_err(|e| ApiError(format!("Response was not valid UTF8: {}", e)))?;
- let body = serde_json::from_str::<models::AuthTokenResult>(body)?;
+ let body = serde_json::from_str::<models::AuthTokenResult>(body).map_err(|e| {
+ ApiError(format!("Response body did not match the schema: {}", e))
+ })?;
Ok(CreateAuthTokenResponse::Success(body))
}
400 => {
let body = response.into_body();
let body = body
- .to_raw()
+ .into_raw()
.map_err(|e| ApiError(format!("Failed to read response: {}", e)))
.await?;
let body = str::from_utf8(&body)
.map_err(|e| ApiError(format!("Response was not valid UTF8: {}", e)))?;
- let body = serde_json::from_str::<models::ErrorResponse>(body)?;
+ let body = serde_json::from_str::<models::ErrorResponse>(body).map_err(|e| {
+ ApiError(format!("Response body did not match the schema: {}", e))
+ })?;
Ok(CreateAuthTokenResponse::BadRequest(body))
}
401 => {
@@ -1157,12 +1199,14 @@ where
let body = response.into_body();
let body = body
- .to_raw()
+ .into_raw()
.map_err(|e| ApiError(format!("Failed to read response: {}", e)))
.await?;
let body = str::from_utf8(&body)
.map_err(|e| ApiError(format!("Response was not valid UTF8: {}", e)))?;
- let body = serde_json::from_str::<models::ErrorResponse>(body)?;
+ let body = serde_json::from_str::<models::ErrorResponse>(body).map_err(|e| {
+ ApiError(format!("Response body did not match the schema: {}", e))
+ })?;
Ok(CreateAuthTokenResponse::NotAuthorized {
body: body,
www_authenticate: response_www_authenticate,
@@ -1171,28 +1215,32 @@ where
403 => {
let body = response.into_body();
let body = body
- .to_raw()
+ .into_raw()
.map_err(|e| ApiError(format!("Failed to read response: {}", e)))
.await?;
let body = str::from_utf8(&body)
.map_err(|e| ApiError(format!("Response was not valid UTF8: {}", e)))?;
- let body = serde_json::from_str::<models::ErrorResponse>(body)?;
+ let body = serde_json::from_str::<models::ErrorResponse>(body).map_err(|e| {
+ ApiError(format!("Response body did not match the schema: {}", e))
+ })?;
Ok(CreateAuthTokenResponse::Forbidden(body))
}
500 => {
let body = response.into_body();
let body = body
- .to_raw()
+ .into_raw()
.map_err(|e| ApiError(format!("Failed to read response: {}", e)))
.await?;
let body = str::from_utf8(&body)
.map_err(|e| ApiError(format!("Response was not valid UTF8: {}", e)))?;
- let body = serde_json::from_str::<models::ErrorResponse>(body)?;
+ let body = serde_json::from_str::<models::ErrorResponse>(body).map_err(|e| {
+ ApiError(format!("Response body did not match the schema: {}", e))
+ })?;
Ok(CreateAuthTokenResponse::GenericError(body))
}
code => {
let headers = response.headers().clone();
- let body = response.into_body().take(100).to_raw().await;
+ let body = response.into_body().take(100).into_raw().await;
Err(ApiError(format!(
"Unexpected response code {}:\n{:?}\n\n{}",
code,
@@ -1314,23 +1362,27 @@ where
201 => {
let body = response.into_body();
let body = body
- .to_raw()
+ .into_raw()
.map_err(|e| ApiError(format!("Failed to read response: {}", e)))
.await?;
let body = str::from_utf8(&body)
.map_err(|e| ApiError(format!("Response was not valid UTF8: {}", e)))?;
- let body = serde_json::from_str::<models::EntityEdit>(body)?;
+ let body = serde_json::from_str::<models::EntityEdit>(body).map_err(|e| {
+ ApiError(format!("Response body did not match the schema: {}", e))
+ })?;
Ok(CreateContainerResponse::CreatedEntity(body))
}
400 => {
let body = response.into_body();
let body = body
- .to_raw()
+ .into_raw()
.map_err(|e| ApiError(format!("Failed to read response: {}", e)))
.await?;
let body = str::from_utf8(&body)
.map_err(|e| ApiError(format!("Response was not valid UTF8: {}", e)))?;
- let body = serde_json::from_str::<models::ErrorResponse>(body)?;
+ let body = serde_json::from_str::<models::ErrorResponse>(body).map_err(|e| {
+ ApiError(format!("Response body did not match the schema: {}", e))
+ })?;
Ok(CreateContainerResponse::BadRequest(body))
}
401 => {
@@ -1358,12 +1410,14 @@ where
let body = response.into_body();
let body = body
- .to_raw()
+ .into_raw()
.map_err(|e| ApiError(format!("Failed to read response: {}", e)))
.await?;
let body = str::from_utf8(&body)
.map_err(|e| ApiError(format!("Response was not valid UTF8: {}", e)))?;
- let body = serde_json::from_str::<models::ErrorResponse>(body)?;
+ let body = serde_json::from_str::<models::ErrorResponse>(body).map_err(|e| {
+ ApiError(format!("Response body did not match the schema: {}", e))
+ })?;
Ok(CreateContainerResponse::NotAuthorized {
body: body,
www_authenticate: response_www_authenticate,
@@ -1372,39 +1426,45 @@ where
403 => {
let body = response.into_body();
let body = body
- .to_raw()
+ .into_raw()
.map_err(|e| ApiError(format!("Failed to read response: {}", e)))
.await?;
let body = str::from_utf8(&body)
.map_err(|e| ApiError(format!("Response was not valid UTF8: {}", e)))?;
- let body = serde_json::from_str::<models::ErrorResponse>(body)?;
+ let body = serde_json::from_str::<models::ErrorResponse>(body).map_err(|e| {
+ ApiError(format!("Response body did not match the schema: {}", e))
+ })?;
Ok(CreateContainerResponse::Forbidden(body))
}
404 => {
let body = response.into_body();
let body = body
- .to_raw()
+ .into_raw()
.map_err(|e| ApiError(format!("Failed to read response: {}", e)))
.await?;
let body = str::from_utf8(&body)
.map_err(|e| ApiError(format!("Response was not valid UTF8: {}", e)))?;
- let body = serde_json::from_str::<models::ErrorResponse>(body)?;
+ let body = serde_json::from_str::<models::ErrorResponse>(body).map_err(|e| {
+ ApiError(format!("Response body did not match the schema: {}", e))
+ })?;
Ok(CreateContainerResponse::NotFound(body))
}
500 => {
let body = response.into_body();
let body = body
- .to_raw()
+ .into_raw()
.map_err(|e| ApiError(format!("Failed to read response: {}", e)))
.await?;
let body = str::from_utf8(&body)
.map_err(|e| ApiError(format!("Response was not valid UTF8: {}", e)))?;
- let body = serde_json::from_str::<models::ErrorResponse>(body)?;
+ let body = serde_json::from_str::<models::ErrorResponse>(body).map_err(|e| {
+ ApiError(format!("Response body did not match the schema: {}", e))
+ })?;
Ok(CreateContainerResponse::GenericError(body))
}
code => {
let headers = response.headers().clone();
- let body = response.into_body().take(100).to_raw().await;
+ let body = response.into_body().take(100).into_raw().await;
Err(ApiError(format!(
"Unexpected response code {}:\n{:?}\n\n{}",
code,
@@ -1521,23 +1581,27 @@ where
201 => {
let body = response.into_body();
let body = body
- .to_raw()
+ .into_raw()
.map_err(|e| ApiError(format!("Failed to read response: {}", e)))
.await?;
let body = str::from_utf8(&body)
.map_err(|e| ApiError(format!("Response was not valid UTF8: {}", e)))?;
- let body = serde_json::from_str::<models::Editgroup>(body)?;
+ let body = serde_json::from_str::<models::Editgroup>(body).map_err(|e| {
+ ApiError(format!("Response body did not match the schema: {}", e))
+ })?;
Ok(CreateContainerAutoBatchResponse::CreatedEditgroup(body))
}
400 => {
let body = response.into_body();
let body = body
- .to_raw()
+ .into_raw()
.map_err(|e| ApiError(format!("Failed to read response: {}", e)))
.await?;
let body = str::from_utf8(&body)
.map_err(|e| ApiError(format!("Response was not valid UTF8: {}", e)))?;
- let body = serde_json::from_str::<models::ErrorResponse>(body)?;
+ let body = serde_json::from_str::<models::ErrorResponse>(body).map_err(|e| {
+ ApiError(format!("Response body did not match the schema: {}", e))
+ })?;
Ok(CreateContainerAutoBatchResponse::BadRequest(body))
}
401 => {
@@ -1565,12 +1629,14 @@ where
let body = response.into_body();
let body = body
- .to_raw()
+ .into_raw()
.map_err(|e| ApiError(format!("Failed to read response: {}", e)))
.await?;
let body = str::from_utf8(&body)
.map_err(|e| ApiError(format!("Response was not valid UTF8: {}", e)))?;
- let body = serde_json::from_str::<models::ErrorResponse>(body)?;
+ let body = serde_json::from_str::<models::ErrorResponse>(body).map_err(|e| {
+ ApiError(format!("Response body did not match the schema: {}", e))
+ })?;
Ok(CreateContainerAutoBatchResponse::NotAuthorized {
body: body,
www_authenticate: response_www_authenticate,
@@ -1579,39 +1645,45 @@ where
403 => {
let body = response.into_body();
let body = body
- .to_raw()
+ .into_raw()
.map_err(|e| ApiError(format!("Failed to read response: {}", e)))
.await?;
let body = str::from_utf8(&body)
.map_err(|e| ApiError(format!("Response was not valid UTF8: {}", e)))?;
- let body = serde_json::from_str::<models::ErrorResponse>(body)?;
+ let body = serde_json::from_str::<models::ErrorResponse>(body).map_err(|e| {
+ ApiError(format!("Response body did not match the schema: {}", e))
+ })?;
Ok(CreateContainerAutoBatchResponse::Forbidden(body))
}
404 => {
let body = response.into_body();
let body = body
- .to_raw()
+ .into_raw()
.map_err(|e| ApiError(format!("Failed to read response: {}", e)))
.await?;
let body = str::from_utf8(&body)
.map_err(|e| ApiError(format!("Response was not valid UTF8: {}", e)))?;
- let body = serde_json::from_str::<models::ErrorResponse>(body)?;
+ let body = serde_json::from_str::<models::ErrorResponse>(body).map_err(|e| {
+ ApiError(format!("Response body did not match the schema: {}", e))
+ })?;
Ok(CreateContainerAutoBatchResponse::NotFound(body))
}
500 => {
let body = response.into_body();
let body = body
- .to_raw()
+ .into_raw()
.map_err(|e| ApiError(format!("Failed to read response: {}", e)))
.await?;
let body = str::from_utf8(&body)
.map_err(|e| ApiError(format!("Response was not valid UTF8: {}", e)))?;
- let body = serde_json::from_str::<models::ErrorResponse>(body)?;
+ let body = serde_json::from_str::<models::ErrorResponse>(body).map_err(|e| {
+ ApiError(format!("Response body did not match the schema: {}", e))
+ })?;
Ok(CreateContainerAutoBatchResponse::GenericError(body))
}
code => {
let headers = response.headers().clone();
- let body = response.into_body().take(100).to_raw().await;
+ let body = response.into_body().take(100).into_raw().await;
Err(ApiError(format!(
"Unexpected response code {}:\n{:?}\n\n{}",
code,
@@ -1733,23 +1805,27 @@ where
201 => {
let body = response.into_body();
let body = body
- .to_raw()
+ .into_raw()
.map_err(|e| ApiError(format!("Failed to read response: {}", e)))
.await?;
let body = str::from_utf8(&body)
.map_err(|e| ApiError(format!("Response was not valid UTF8: {}", e)))?;
- let body = serde_json::from_str::<models::EntityEdit>(body)?;
+ let body = serde_json::from_str::<models::EntityEdit>(body).map_err(|e| {
+ ApiError(format!("Response body did not match the schema: {}", e))
+ })?;
Ok(CreateCreatorResponse::CreatedEntity(body))
}
400 => {
let body = response.into_body();
let body = body
- .to_raw()
+ .into_raw()
.map_err(|e| ApiError(format!("Failed to read response: {}", e)))
.await?;
let body = str::from_utf8(&body)
.map_err(|e| ApiError(format!("Response was not valid UTF8: {}", e)))?;
- let body = serde_json::from_str::<models::ErrorResponse>(body)?;
+ let body = serde_json::from_str::<models::ErrorResponse>(body).map_err(|e| {
+ ApiError(format!("Response body did not match the schema: {}", e))
+ })?;
Ok(CreateCreatorResponse::BadRequest(body))
}
401 => {
@@ -1777,12 +1853,14 @@ where
let body = response.into_body();
let body = body
- .to_raw()
+ .into_raw()
.map_err(|e| ApiError(format!("Failed to read response: {}", e)))
.await?;
let body = str::from_utf8(&body)
.map_err(|e| ApiError(format!("Response was not valid UTF8: {}", e)))?;
- let body = serde_json::from_str::<models::ErrorResponse>(body)?;
+ let body = serde_json::from_str::<models::ErrorResponse>(body).map_err(|e| {
+ ApiError(format!("Response body did not match the schema: {}", e))
+ })?;
Ok(CreateCreatorResponse::NotAuthorized {
body: body,
www_authenticate: response_www_authenticate,
@@ -1791,39 +1869,45 @@ where
403 => {
let body = response.into_body();
let body = body
- .to_raw()
+ .into_raw()
.map_err(|e| ApiError(format!("Failed to read response: {}", e)))
.await?;
let body = str::from_utf8(&body)
.map_err(|e| ApiError(format!("Response was not valid UTF8: {}", e)))?;
- let body = serde_json::from_str::<models::ErrorResponse>(body)?;
+ let body = serde_json::from_str::<models::ErrorResponse>(body).map_err(|e| {
+ ApiError(format!("Response body did not match the schema: {}", e))
+ })?;
Ok(CreateCreatorResponse::Forbidden(body))
}
404 => {
let body = response.into_body();
let body = body
- .to_raw()
+ .into_raw()
.map_err(|e| ApiError(format!("Failed to read response: {}", e)))
.await?;
let body = str::from_utf8(&body)
.map_err(|e| ApiError(format!("Response was not valid UTF8: {}", e)))?;
- let body = serde_json::from_str::<models::ErrorResponse>(body)?;
+ let body = serde_json::from_str::<models::ErrorResponse>(body).map_err(|e| {
+ ApiError(format!("Response body did not match the schema: {}", e))
+ })?;
Ok(CreateCreatorResponse::NotFound(body))
}
500 => {
let body = response.into_body();
let body = body
- .to_raw()
+ .into_raw()
.map_err(|e| ApiError(format!("Failed to read response: {}", e)))
.await?;
let body = str::from_utf8(&body)
.map_err(|e| ApiError(format!("Response was not valid UTF8: {}", e)))?;
- let body = serde_json::from_str::<models::ErrorResponse>(body)?;
+ let body = serde_json::from_str::<models::ErrorResponse>(body).map_err(|e| {
+ ApiError(format!("Response body did not match the schema: {}", e))
+ })?;
Ok(CreateCreatorResponse::GenericError(body))
}
code => {
let headers = response.headers().clone();
- let body = response.into_body().take(100).to_raw().await;
+ let body = response.into_body().take(100).into_raw().await;
Err(ApiError(format!(
"Unexpected response code {}:\n{:?}\n\n{}",
code,
@@ -1940,23 +2024,27 @@ where
201 => {
let body = response.into_body();
let body = body
- .to_raw()
+ .into_raw()
.map_err(|e| ApiError(format!("Failed to read response: {}", e)))
.await?;
let body = str::from_utf8(&body)
.map_err(|e| ApiError(format!("Response was not valid UTF8: {}", e)))?;
- let body = serde_json::from_str::<models::Editgroup>(body)?;
+ let body = serde_json::from_str::<models::Editgroup>(body).map_err(|e| {
+ ApiError(format!("Response body did not match the schema: {}", e))
+ })?;
Ok(CreateCreatorAutoBatchResponse::CreatedEditgroup(body))
}
400 => {
let body = response.into_body();
let body = body
- .to_raw()
+ .into_raw()
.map_err(|e| ApiError(format!("Failed to read response: {}", e)))
.await?;
let body = str::from_utf8(&body)
.map_err(|e| ApiError(format!("Response was not valid UTF8: {}", e)))?;
- let body = serde_json::from_str::<models::ErrorResponse>(body)?;
+ let body = serde_json::from_str::<models::ErrorResponse>(body).map_err(|e| {
+ ApiError(format!("Response body did not match the schema: {}", e))
+ })?;
Ok(CreateCreatorAutoBatchResponse::BadRequest(body))
}
401 => {
@@ -1984,12 +2072,14 @@ where
let body = response.into_body();
let body = body
- .to_raw()
+ .into_raw()
.map_err(|e| ApiError(format!("Failed to read response: {}", e)))
.await?;
let body = str::from_utf8(&body)
.map_err(|e| ApiError(format!("Response was not valid UTF8: {}", e)))?;
- let body = serde_json::from_str::<models::ErrorResponse>(body)?;
+ let body = serde_json::from_str::<models::ErrorResponse>(body).map_err(|e| {
+ ApiError(format!("Response body did not match the schema: {}", e))
+ })?;
Ok(CreateCreatorAutoBatchResponse::NotAuthorized {
body: body,
www_authenticate: response_www_authenticate,
@@ -1998,39 +2088,45 @@ where
403 => {
let body = response.into_body();
let body = body
- .to_raw()
+ .into_raw()
.map_err(|e| ApiError(format!("Failed to read response: {}", e)))
.await?;
let body = str::from_utf8(&body)
.map_err(|e| ApiError(format!("Response was not valid UTF8: {}", e)))?;
- let body = serde_json::from_str::<models::ErrorResponse>(body)?;
+ let body = serde_json::from_str::<models::ErrorResponse>(body).map_err(|e| {
+ ApiError(format!("Response body did not match the schema: {}", e))
+ })?;
Ok(CreateCreatorAutoBatchResponse::Forbidden(body))
}
404 => {
let body = response.into_body();
let body = body
- .to_raw()
+ .into_raw()
.map_err(|e| ApiError(format!("Failed to read response: {}", e)))
.await?;
let body = str::from_utf8(&body)
.map_err(|e| ApiError(format!("Response was not valid UTF8: {}", e)))?;
- let body = serde_json::from_str::<models::ErrorResponse>(body)?;
+ let body = serde_json::from_str::<models::ErrorResponse>(body).map_err(|e| {
+ ApiError(format!("Response body did not match the schema: {}", e))
+ })?;
Ok(CreateCreatorAutoBatchResponse::NotFound(body))
}
500 => {
let body = response.into_body();
let body = body
- .to_raw()
+ .into_raw()
.map_err(|e| ApiError(format!("Failed to read response: {}", e)))
.await?;
let body = str::from_utf8(&body)
.map_err(|e| ApiError(format!("Response was not valid UTF8: {}", e)))?;
- let body = serde_json::from_str::<models::ErrorResponse>(body)?;
+ let body = serde_json::from_str::<models::ErrorResponse>(body).map_err(|e| {
+ ApiError(format!("Response body did not match the schema: {}", e))
+ })?;
Ok(CreateCreatorAutoBatchResponse::GenericError(body))
}
code => {
let headers = response.headers().clone();
- let body = response.into_body().take(100).to_raw().await;
+ let body = response.into_body().take(100).into_raw().await;
Err(ApiError(format!(
"Unexpected response code {}:\n{:?}\n\n{}",
code,
@@ -2147,23 +2243,27 @@ where
201 => {
let body = response.into_body();
let body = body
- .to_raw()
+ .into_raw()
.map_err(|e| ApiError(format!("Failed to read response: {}", e)))
.await?;
let body = str::from_utf8(&body)
.map_err(|e| ApiError(format!("Response was not valid UTF8: {}", e)))?;
- let body = serde_json::from_str::<models::Editgroup>(body)?;
+ let body = serde_json::from_str::<models::Editgroup>(body).map_err(|e| {
+ ApiError(format!("Response body did not match the schema: {}", e))
+ })?;
Ok(CreateEditgroupResponse::SuccessfullyCreated(body))
}
400 => {
let body = response.into_body();
let body = body
- .to_raw()
+ .into_raw()
.map_err(|e| ApiError(format!("Failed to read response: {}", e)))
.await?;
let body = str::from_utf8(&body)
.map_err(|e| ApiError(format!("Response was not valid UTF8: {}", e)))?;
- let body = serde_json::from_str::<models::ErrorResponse>(body)?;
+ let body = serde_json::from_str::<models::ErrorResponse>(body).map_err(|e| {
+ ApiError(format!("Response body did not match the schema: {}", e))
+ })?;
Ok(CreateEditgroupResponse::BadRequest(body))
}
401 => {
@@ -2191,12 +2291,14 @@ where
let body = response.into_body();
let body = body
- .to_raw()
+ .into_raw()
.map_err(|e| ApiError(format!("Failed to read response: {}", e)))
.await?;
let body = str::from_utf8(&body)
.map_err(|e| ApiError(format!("Response was not valid UTF8: {}", e)))?;
- let body = serde_json::from_str::<models::ErrorResponse>(body)?;
+ let body = serde_json::from_str::<models::ErrorResponse>(body).map_err(|e| {
+ ApiError(format!("Response body did not match the schema: {}", e))
+ })?;
Ok(CreateEditgroupResponse::NotAuthorized {
body: body,
www_authenticate: response_www_authenticate,
@@ -2205,39 +2307,45 @@ where
403 => {
let body = response.into_body();
let body = body
- .to_raw()
+ .into_raw()
.map_err(|e| ApiError(format!("Failed to read response: {}", e)))
.await?;
let body = str::from_utf8(&body)
.map_err(|e| ApiError(format!("Response was not valid UTF8: {}", e)))?;
- let body = serde_json::from_str::<models::ErrorResponse>(body)?;
+ let body = serde_json::from_str::<models::ErrorResponse>(body).map_err(|e| {
+ ApiError(format!("Response body did not match the schema: {}", e))
+ })?;
Ok(CreateEditgroupResponse::Forbidden(body))
}
404 => {
let body = response.into_body();
let body = body
- .to_raw()
+ .into_raw()
.map_err(|e| ApiError(format!("Failed to read response: {}", e)))
.await?;
let body = str::from_utf8(&body)
.map_err(|e| ApiError(format!("Response was not valid UTF8: {}", e)))?;
- let body = serde_json::from_str::<models::ErrorResponse>(body)?;
+ let body = serde_json::from_str::<models::ErrorResponse>(body).map_err(|e| {
+ ApiError(format!("Response body did not match the schema: {}", e))
+ })?;
Ok(CreateEditgroupResponse::NotFound(body))
}
500 => {
let body = response.into_body();
let body = body
- .to_raw()
+ .into_raw()
.map_err(|e| ApiError(format!("Failed to read response: {}", e)))
.await?;
let body = str::from_utf8(&body)
.map_err(|e| ApiError(format!("Response was not valid UTF8: {}", e)))?;
- let body = serde_json::from_str::<models::ErrorResponse>(body)?;
+ let body = serde_json::from_str::<models::ErrorResponse>(body).map_err(|e| {
+ ApiError(format!("Response body did not match the schema: {}", e))
+ })?;
Ok(CreateEditgroupResponse::GenericError(body))
}
code => {
let headers = response.headers().clone();
- let body = response.into_body().take(100).to_raw().await;
+ let body = response.into_body().take(100).into_raw().await;
Err(ApiError(format!(
"Unexpected response code {}:\n{:?}\n\n{}",
code,
@@ -2359,23 +2467,28 @@ where
201 => {
let body = response.into_body();
let body = body
- .to_raw()
+ .into_raw()
.map_err(|e| ApiError(format!("Failed to read response: {}", e)))
.await?;
let body = str::from_utf8(&body)
.map_err(|e| ApiError(format!("Response was not valid UTF8: {}", e)))?;
- let body = serde_json::from_str::<models::EditgroupAnnotation>(body)?;
+ let body =
+ serde_json::from_str::<models::EditgroupAnnotation>(body).map_err(|e| {
+ ApiError(format!("Response body did not match the schema: {}", e))
+ })?;
Ok(CreateEditgroupAnnotationResponse::Created(body))
}
400 => {
let body = response.into_body();
let body = body
- .to_raw()
+ .into_raw()
.map_err(|e| ApiError(format!("Failed to read response: {}", e)))
.await?;
let body = str::from_utf8(&body)
.map_err(|e| ApiError(format!("Response was not valid UTF8: {}", e)))?;
- let body = serde_json::from_str::<models::ErrorResponse>(body)?;
+ let body = serde_json::from_str::<models::ErrorResponse>(body).map_err(|e| {
+ ApiError(format!("Response body did not match the schema: {}", e))
+ })?;
Ok(CreateEditgroupAnnotationResponse::BadRequest(body))
}
401 => {
@@ -2403,12 +2516,14 @@ where
let body = response.into_body();
let body = body
- .to_raw()
+ .into_raw()
.map_err(|e| ApiError(format!("Failed to read response: {}", e)))
.await?;
let body = str::from_utf8(&body)
.map_err(|e| ApiError(format!("Response was not valid UTF8: {}", e)))?;
- let body = serde_json::from_str::<models::ErrorResponse>(body)?;
+ let body = serde_json::from_str::<models::ErrorResponse>(body).map_err(|e| {
+ ApiError(format!("Response body did not match the schema: {}", e))
+ })?;
Ok(CreateEditgroupAnnotationResponse::NotAuthorized {
body: body,
www_authenticate: response_www_authenticate,
@@ -2417,39 +2532,45 @@ where
403 => {
let body = response.into_body();
let body = body
- .to_raw()
+ .into_raw()
.map_err(|e| ApiError(format!("Failed to read response: {}", e)))
.await?;
let body = str::from_utf8(&body)
.map_err(|e| ApiError(format!("Response was not valid UTF8: {}", e)))?;
- let body = serde_json::from_str::<models::ErrorResponse>(body)?;
+ let body = serde_json::from_str::<models::ErrorResponse>(body).map_err(|e| {
+ ApiError(format!("Response body did not match the schema: {}", e))
+ })?;
Ok(CreateEditgroupAnnotationResponse::Forbidden(body))
}
404 => {
let body = response.into_body();
let body = body
- .to_raw()
+ .into_raw()
.map_err(|e| ApiError(format!("Failed to read response: {}", e)))
.await?;
let body = str::from_utf8(&body)
.map_err(|e| ApiError(format!("Response was not valid UTF8: {}", e)))?;
- let body = serde_json::from_str::<models::ErrorResponse>(body)?;
+ let body = serde_json::from_str::<models::ErrorResponse>(body).map_err(|e| {
+ ApiError(format!("Response body did not match the schema: {}", e))
+ })?;
Ok(CreateEditgroupAnnotationResponse::NotFound(body))
}
500 => {
let body = response.into_body();
let body = body
- .to_raw()
+ .into_raw()
.map_err(|e| ApiError(format!("Failed to read response: {}", e)))
.await?;
let body = str::from_utf8(&body)
.map_err(|e| ApiError(format!("Response was not valid UTF8: {}", e)))?;
- let body = serde_json::from_str::<models::ErrorResponse>(body)?;
+ let body = serde_json::from_str::<models::ErrorResponse>(body).map_err(|e| {
+ ApiError(format!("Response body did not match the schema: {}", e))
+ })?;
Ok(CreateEditgroupAnnotationResponse::GenericError(body))
}
code => {
let headers = response.headers().clone();
- let body = response.into_body().take(100).to_raw().await;
+ let body = response.into_body().take(100).into_raw().await;
Err(ApiError(format!(
"Unexpected response code {}:\n{:?}\n\n{}",
code,
@@ -2571,23 +2692,27 @@ where
201 => {
let body = response.into_body();
let body = body
- .to_raw()
+ .into_raw()
.map_err(|e| ApiError(format!("Failed to read response: {}", e)))
.await?;
let body = str::from_utf8(&body)
.map_err(|e| ApiError(format!("Response was not valid UTF8: {}", e)))?;
- let body = serde_json::from_str::<models::EntityEdit>(body)?;
+ let body = serde_json::from_str::<models::EntityEdit>(body).map_err(|e| {
+ ApiError(format!("Response body did not match the schema: {}", e))
+ })?;
Ok(CreateFileResponse::CreatedEntity(body))
}
400 => {
let body = response.into_body();
let body = body
- .to_raw()
+ .into_raw()
.map_err(|e| ApiError(format!("Failed to read response: {}", e)))
.await?;
let body = str::from_utf8(&body)
.map_err(|e| ApiError(format!("Response was not valid UTF8: {}", e)))?;
- let body = serde_json::from_str::<models::ErrorResponse>(body)?;
+ let body = serde_json::from_str::<models::ErrorResponse>(body).map_err(|e| {
+ ApiError(format!("Response body did not match the schema: {}", e))
+ })?;
Ok(CreateFileResponse::BadRequest(body))
}
401 => {
@@ -2615,12 +2740,14 @@ where
let body = response.into_body();
let body = body
- .to_raw()
+ .into_raw()
.map_err(|e| ApiError(format!("Failed to read response: {}", e)))
.await?;
let body = str::from_utf8(&body)
.map_err(|e| ApiError(format!("Response was not valid UTF8: {}", e)))?;
- let body = serde_json::from_str::<models::ErrorResponse>(body)?;
+ let body = serde_json::from_str::<models::ErrorResponse>(body).map_err(|e| {
+ ApiError(format!("Response body did not match the schema: {}", e))
+ })?;
Ok(CreateFileResponse::NotAuthorized {
body: body,
www_authenticate: response_www_authenticate,
@@ -2629,39 +2756,45 @@ where
403 => {
let body = response.into_body();
let body = body
- .to_raw()
+ .into_raw()
.map_err(|e| ApiError(format!("Failed to read response: {}", e)))
.await?;
let body = str::from_utf8(&body)
.map_err(|e| ApiError(format!("Response was not valid UTF8: {}", e)))?;
- let body = serde_json::from_str::<models::ErrorResponse>(body)?;
+ let body = serde_json::from_str::<models::ErrorResponse>(body).map_err(|e| {
+ ApiError(format!("Response body did not match the schema: {}", e))
+ })?;
Ok(CreateFileResponse::Forbidden(body))
}
404 => {
let body = response.into_body();
let body = body
- .to_raw()
+ .into_raw()
.map_err(|e| ApiError(format!("Failed to read response: {}", e)))
.await?;
let body = str::from_utf8(&body)
.map_err(|e| ApiError(format!("Response was not valid UTF8: {}", e)))?;
- let body = serde_json::from_str::<models::ErrorResponse>(body)?;
+ let body = serde_json::from_str::<models::ErrorResponse>(body).map_err(|e| {
+ ApiError(format!("Response body did not match the schema: {}", e))
+ })?;
Ok(CreateFileResponse::NotFound(body))
}
500 => {
let body = response.into_body();
let body = body
- .to_raw()
+ .into_raw()
.map_err(|e| ApiError(format!("Failed to read response: {}", e)))
.await?;
let body = str::from_utf8(&body)
.map_err(|e| ApiError(format!("Response was not valid UTF8: {}", e)))?;
- let body = serde_json::from_str::<models::ErrorResponse>(body)?;
+ let body = serde_json::from_str::<models::ErrorResponse>(body).map_err(|e| {
+ ApiError(format!("Response body did not match the schema: {}", e))
+ })?;
Ok(CreateFileResponse::GenericError(body))
}
code => {
let headers = response.headers().clone();
- let body = response.into_body().take(100).to_raw().await;
+ let body = response.into_body().take(100).into_raw().await;
Err(ApiError(format!(
"Unexpected response code {}:\n{:?}\n\n{}",
code,
@@ -2778,23 +2911,27 @@ where
201 => {
let body = response.into_body();
let body = body
- .to_raw()
+ .into_raw()
.map_err(|e| ApiError(format!("Failed to read response: {}", e)))
.await?;
let body = str::from_utf8(&body)
.map_err(|e| ApiError(format!("Response was not valid UTF8: {}", e)))?;
- let body = serde_json::from_str::<models::Editgroup>(body)?;
+ let body = serde_json::from_str::<models::Editgroup>(body).map_err(|e| {
+ ApiError(format!("Response body did not match the schema: {}", e))
+ })?;
Ok(CreateFileAutoBatchResponse::CreatedEditgroup(body))
}
400 => {
let body = response.into_body();
let body = body
- .to_raw()
+ .into_raw()
.map_err(|e| ApiError(format!("Failed to read response: {}", e)))
.await?;
let body = str::from_utf8(&body)
.map_err(|e| ApiError(format!("Response was not valid UTF8: {}", e)))?;
- let body = serde_json::from_str::<models::ErrorResponse>(body)?;
+ let body = serde_json::from_str::<models::ErrorResponse>(body).map_err(|e| {
+ ApiError(format!("Response body did not match the schema: {}", e))
+ })?;
Ok(CreateFileAutoBatchResponse::BadRequest(body))
}
401 => {
@@ -2822,12 +2959,14 @@ where
let body = response.into_body();
let body = body
- .to_raw()
+ .into_raw()
.map_err(|e| ApiError(format!("Failed to read response: {}", e)))
.await?;
let body = str::from_utf8(&body)
.map_err(|e| ApiError(format!("Response was not valid UTF8: {}", e)))?;
- let body = serde_json::from_str::<models::ErrorResponse>(body)?;
+ let body = serde_json::from_str::<models::ErrorResponse>(body).map_err(|e| {
+ ApiError(format!("Response body did not match the schema: {}", e))
+ })?;
Ok(CreateFileAutoBatchResponse::NotAuthorized {
body: body,
www_authenticate: response_www_authenticate,
@@ -2836,39 +2975,45 @@ where
403 => {
let body = response.into_body();
let body = body
- .to_raw()
+ .into_raw()
.map_err(|e| ApiError(format!("Failed to read response: {}", e)))
.await?;
let body = str::from_utf8(&body)
.map_err(|e| ApiError(format!("Response was not valid UTF8: {}", e)))?;
- let body = serde_json::from_str::<models::ErrorResponse>(body)?;
+ let body = serde_json::from_str::<models::ErrorResponse>(body).map_err(|e| {
+ ApiError(format!("Response body did not match the schema: {}", e))
+ })?;
Ok(CreateFileAutoBatchResponse::Forbidden(body))
}
404 => {
let body = response.into_body();
let body = body
- .to_raw()
+ .into_raw()
.map_err(|e| ApiError(format!("Failed to read response: {}", e)))
.await?;
let body = str::from_utf8(&body)
.map_err(|e| ApiError(format!("Response was not valid UTF8: {}", e)))?;
- let body = serde_json::from_str::<models::ErrorResponse>(body)?;
+ let body = serde_json::from_str::<models::ErrorResponse>(body).map_err(|e| {
+ ApiError(format!("Response body did not match the schema: {}", e))
+ })?;
Ok(CreateFileAutoBatchResponse::NotFound(body))
}
500 => {
let body = response.into_body();
let body = body
- .to_raw()
+ .into_raw()
.map_err(|e| ApiError(format!("Failed to read response: {}", e)))
.await?;
let body = str::from_utf8(&body)
.map_err(|e| ApiError(format!("Response was not valid UTF8: {}", e)))?;
- let body = serde_json::from_str::<models::ErrorResponse>(body)?;
+ let body = serde_json::from_str::<models::ErrorResponse>(body).map_err(|e| {
+ ApiError(format!("Response body did not match the schema: {}", e))
+ })?;
Ok(CreateFileAutoBatchResponse::GenericError(body))
}
code => {
let headers = response.headers().clone();
- let body = response.into_body().take(100).to_raw().await;
+ let body = response.into_body().take(100).into_raw().await;
Err(ApiError(format!(
"Unexpected response code {}:\n{:?}\n\n{}",
code,
@@ -2990,23 +3135,27 @@ where
201 => {
let body = response.into_body();
let body = body
- .to_raw()
+ .into_raw()
.map_err(|e| ApiError(format!("Failed to read response: {}", e)))
.await?;
let body = str::from_utf8(&body)
.map_err(|e| ApiError(format!("Response was not valid UTF8: {}", e)))?;
- let body = serde_json::from_str::<models::EntityEdit>(body)?;
+ let body = serde_json::from_str::<models::EntityEdit>(body).map_err(|e| {
+ ApiError(format!("Response body did not match the schema: {}", e))
+ })?;
Ok(CreateFilesetResponse::CreatedEntity(body))
}
400 => {
let body = response.into_body();
let body = body
- .to_raw()
+ .into_raw()
.map_err(|e| ApiError(format!("Failed to read response: {}", e)))
.await?;
let body = str::from_utf8(&body)
.map_err(|e| ApiError(format!("Response was not valid UTF8: {}", e)))?;
- let body = serde_json::from_str::<models::ErrorResponse>(body)?;
+ let body = serde_json::from_str::<models::ErrorResponse>(body).map_err(|e| {
+ ApiError(format!("Response body did not match the schema: {}", e))
+ })?;
Ok(CreateFilesetResponse::BadRequest(body))
}
401 => {
@@ -3034,12 +3183,14 @@ where
let body = response.into_body();
let body = body
- .to_raw()
+ .into_raw()
.map_err(|e| ApiError(format!("Failed to read response: {}", e)))
.await?;
let body = str::from_utf8(&body)
.map_err(|e| ApiError(format!("Response was not valid UTF8: {}", e)))?;
- let body = serde_json::from_str::<models::ErrorResponse>(body)?;
+ let body = serde_json::from_str::<models::ErrorResponse>(body).map_err(|e| {
+ ApiError(format!("Response body did not match the schema: {}", e))
+ })?;
Ok(CreateFilesetResponse::NotAuthorized {
body: body,
www_authenticate: response_www_authenticate,
@@ -3048,39 +3199,45 @@ where
403 => {
let body = response.into_body();
let body = body
- .to_raw()
+ .into_raw()
.map_err(|e| ApiError(format!("Failed to read response: {}", e)))
.await?;
let body = str::from_utf8(&body)
.map_err(|e| ApiError(format!("Response was not valid UTF8: {}", e)))?;
- let body = serde_json::from_str::<models::ErrorResponse>(body)?;
+ let body = serde_json::from_str::<models::ErrorResponse>(body).map_err(|e| {
+ ApiError(format!("Response body did not match the schema: {}", e))
+ })?;
Ok(CreateFilesetResponse::Forbidden(body))
}
404 => {
let body = response.into_body();
let body = body
- .to_raw()
+ .into_raw()
.map_err(|e| ApiError(format!("Failed to read response: {}", e)))
.await?;
let body = str::from_utf8(&body)
.map_err(|e| ApiError(format!("Response was not valid UTF8: {}", e)))?;
- let body = serde_json::from_str::<models::ErrorResponse>(body)?;
+ let body = serde_json::from_str::<models::ErrorResponse>(body).map_err(|e| {
+ ApiError(format!("Response body did not match the schema: {}", e))
+ })?;
Ok(CreateFilesetResponse::NotFound(body))
}
500 => {
let body = response.into_body();
let body = body
- .to_raw()
+ .into_raw()
.map_err(|e| ApiError(format!("Failed to read response: {}", e)))
.await?;
let body = str::from_utf8(&body)
.map_err(|e| ApiError(format!("Response was not valid UTF8: {}", e)))?;
- let body = serde_json::from_str::<models::ErrorResponse>(body)?;
+ let body = serde_json::from_str::<models::ErrorResponse>(body).map_err(|e| {
+ ApiError(format!("Response body did not match the schema: {}", e))
+ })?;
Ok(CreateFilesetResponse::GenericError(body))
}
code => {
let headers = response.headers().clone();
- let body = response.into_body().take(100).to_raw().await;
+ let body = response.into_body().take(100).into_raw().await;
Err(ApiError(format!(
"Unexpected response code {}:\n{:?}\n\n{}",
code,
@@ -3197,23 +3354,27 @@ where
201 => {
let body = response.into_body();
let body = body
- .to_raw()
+ .into_raw()
.map_err(|e| ApiError(format!("Failed to read response: {}", e)))
.await?;
let body = str::from_utf8(&body)
.map_err(|e| ApiError(format!("Response was not valid UTF8: {}", e)))?;
- let body = serde_json::from_str::<models::Editgroup>(body)?;
+ let body = serde_json::from_str::<models::Editgroup>(body).map_err(|e| {
+ ApiError(format!("Response body did not match the schema: {}", e))
+ })?;
Ok(CreateFilesetAutoBatchResponse::CreatedEditgroup(body))
}
400 => {
let body = response.into_body();
let body = body
- .to_raw()
+ .into_raw()
.map_err(|e| ApiError(format!("Failed to read response: {}", e)))
.await?;
let body = str::from_utf8(&body)
.map_err(|e| ApiError(format!("Response was not valid UTF8: {}", e)))?;
- let body = serde_json::from_str::<models::ErrorResponse>(body)?;
+ let body = serde_json::from_str::<models::ErrorResponse>(body).map_err(|e| {
+ ApiError(format!("Response body did not match the schema: {}", e))
+ })?;
Ok(CreateFilesetAutoBatchResponse::BadRequest(body))
}
401 => {
@@ -3241,12 +3402,14 @@ where
let body = response.into_body();
let body = body
- .to_raw()
+ .into_raw()
.map_err(|e| ApiError(format!("Failed to read response: {}", e)))
.await?;
let body = str::from_utf8(&body)
.map_err(|e| ApiError(format!("Response was not valid UTF8: {}", e)))?;
- let body = serde_json::from_str::<models::ErrorResponse>(body)?;
+ let body = serde_json::from_str::<models::ErrorResponse>(body).map_err(|e| {
+ ApiError(format!("Response body did not match the schema: {}", e))
+ })?;
Ok(CreateFilesetAutoBatchResponse::NotAuthorized {
body: body,
www_authenticate: response_www_authenticate,
@@ -3255,39 +3418,45 @@ where
403 => {
let body = response.into_body();
let body = body
- .to_raw()
+ .into_raw()
.map_err(|e| ApiError(format!("Failed to read response: {}", e)))
.await?;
let body = str::from_utf8(&body)
.map_err(|e| ApiError(format!("Response was not valid UTF8: {}", e)))?;
- let body = serde_json::from_str::<models::ErrorResponse>(body)?;
+ let body = serde_json::from_str::<models::ErrorResponse>(body).map_err(|e| {
+ ApiError(format!("Response body did not match the schema: {}", e))
+ })?;
Ok(CreateFilesetAutoBatchResponse::Forbidden(body))
}
404 => {
let body = response.into_body();
let body = body
- .to_raw()
+ .into_raw()
.map_err(|e| ApiError(format!("Failed to read response: {}", e)))
.await?;
let body = str::from_utf8(&body)
.map_err(|e| ApiError(format!("Response was not valid UTF8: {}", e)))?;
- let body = serde_json::from_str::<models::ErrorResponse>(body)?;
+ let body = serde_json::from_str::<models::ErrorResponse>(body).map_err(|e| {
+ ApiError(format!("Response body did not match the schema: {}", e))
+ })?;
Ok(CreateFilesetAutoBatchResponse::NotFound(body))
}
500 => {
let body = response.into_body();
let body = body
- .to_raw()
+ .into_raw()
.map_err(|e| ApiError(format!("Failed to read response: {}", e)))
.await?;
let body = str::from_utf8(&body)
.map_err(|e| ApiError(format!("Response was not valid UTF8: {}", e)))?;
- let body = serde_json::from_str::<models::ErrorResponse>(body)?;
+ let body = serde_json::from_str::<models::ErrorResponse>(body).map_err(|e| {
+ ApiError(format!("Response body did not match the schema: {}", e))
+ })?;
Ok(CreateFilesetAutoBatchResponse::GenericError(body))
}
code => {
let headers = response.headers().clone();
- let body = response.into_body().take(100).to_raw().await;
+ let body = response.into_body().take(100).into_raw().await;
Err(ApiError(format!(
"Unexpected response code {}:\n{:?}\n\n{}",
code,
@@ -3409,23 +3578,27 @@ where
201 => {
let body = response.into_body();
let body = body
- .to_raw()
+ .into_raw()
.map_err(|e| ApiError(format!("Failed to read response: {}", e)))
.await?;
let body = str::from_utf8(&body)
.map_err(|e| ApiError(format!("Response was not valid UTF8: {}", e)))?;
- let body = serde_json::from_str::<models::EntityEdit>(body)?;
+ let body = serde_json::from_str::<models::EntityEdit>(body).map_err(|e| {
+ ApiError(format!("Response body did not match the schema: {}", e))
+ })?;
Ok(CreateReleaseResponse::CreatedEntity(body))
}
400 => {
let body = response.into_body();
let body = body
- .to_raw()
+ .into_raw()
.map_err(|e| ApiError(format!("Failed to read response: {}", e)))
.await?;
let body = str::from_utf8(&body)
.map_err(|e| ApiError(format!("Response was not valid UTF8: {}", e)))?;
- let body = serde_json::from_str::<models::ErrorResponse>(body)?;
+ let body = serde_json::from_str::<models::ErrorResponse>(body).map_err(|e| {
+ ApiError(format!("Response body did not match the schema: {}", e))
+ })?;
Ok(CreateReleaseResponse::BadRequest(body))
}
401 => {
@@ -3453,12 +3626,14 @@ where
let body = response.into_body();
let body = body
- .to_raw()
+ .into_raw()
.map_err(|e| ApiError(format!("Failed to read response: {}", e)))
.await?;
let body = str::from_utf8(&body)
.map_err(|e| ApiError(format!("Response was not valid UTF8: {}", e)))?;
- let body = serde_json::from_str::<models::ErrorResponse>(body)?;
+ let body = serde_json::from_str::<models::ErrorResponse>(body).map_err(|e| {
+ ApiError(format!("Response body did not match the schema: {}", e))
+ })?;
Ok(CreateReleaseResponse::NotAuthorized {
body: body,
www_authenticate: response_www_authenticate,
@@ -3467,39 +3642,45 @@ where
403 => {
let body = response.into_body();
let body = body
- .to_raw()
+ .into_raw()
.map_err(|e| ApiError(format!("Failed to read response: {}", e)))
.await?;
let body = str::from_utf8(&body)
.map_err(|e| ApiError(format!("Response was not valid UTF8: {}", e)))?;
- let body = serde_json::from_str::<models::ErrorResponse>(body)?;
+ let body = serde_json::from_str::<models::ErrorResponse>(body).map_err(|e| {
+ ApiError(format!("Response body did not match the schema: {}", e))
+ })?;
Ok(CreateReleaseResponse::Forbidden(body))
}
404 => {
let body = response.into_body();
let body = body
- .to_raw()
+ .into_raw()
.map_err(|e| ApiError(format!("Failed to read response: {}", e)))
.await?;
let body = str::from_utf8(&body)
.map_err(|e| ApiError(format!("Response was not valid UTF8: {}", e)))?;
- let body = serde_json::from_str::<models::ErrorResponse>(body)?;
+ let body = serde_json::from_str::<models::ErrorResponse>(body).map_err(|e| {
+ ApiError(format!("Response body did not match the schema: {}", e))
+ })?;
Ok(CreateReleaseResponse::NotFound(body))
}
500 => {
let body = response.into_body();
let body = body
- .to_raw()
+ .into_raw()
.map_err(|e| ApiError(format!("Failed to read response: {}", e)))
.await?;
let body = str::from_utf8(&body)
.map_err(|e| ApiError(format!("Response was not valid UTF8: {}", e)))?;
- let body = serde_json::from_str::<models::ErrorResponse>(body)?;
+ let body = serde_json::from_str::<models::ErrorResponse>(body).map_err(|e| {
+ ApiError(format!("Response body did not match the schema: {}", e))
+ })?;
Ok(CreateReleaseResponse::GenericError(body))
}
code => {
let headers = response.headers().clone();
- let body = response.into_body().take(100).to_raw().await;
+ let body = response.into_body().take(100).into_raw().await;
Err(ApiError(format!(
"Unexpected response code {}:\n{:?}\n\n{}",
code,
@@ -3616,23 +3797,27 @@ where
201 => {
let body = response.into_body();
let body = body
- .to_raw()
+ .into_raw()
.map_err(|e| ApiError(format!("Failed to read response: {}", e)))
.await?;
let body = str::from_utf8(&body)
.map_err(|e| ApiError(format!("Response was not valid UTF8: {}", e)))?;
- let body = serde_json::from_str::<models::Editgroup>(body)?;
+ let body = serde_json::from_str::<models::Editgroup>(body).map_err(|e| {
+ ApiError(format!("Response body did not match the schema: {}", e))
+ })?;
Ok(CreateReleaseAutoBatchResponse::CreatedEditgroup(body))
}
400 => {
let body = response.into_body();
let body = body
- .to_raw()
+ .into_raw()
.map_err(|e| ApiError(format!("Failed to read response: {}", e)))
.await?;
let body = str::from_utf8(&body)
.map_err(|e| ApiError(format!("Response was not valid UTF8: {}", e)))?;
- let body = serde_json::from_str::<models::ErrorResponse>(body)?;
+ let body = serde_json::from_str::<models::ErrorResponse>(body).map_err(|e| {
+ ApiError(format!("Response body did not match the schema: {}", e))
+ })?;
Ok(CreateReleaseAutoBatchResponse::BadRequest(body))
}
401 => {
@@ -3660,12 +3845,14 @@ where
let body = response.into_body();
let body = body
- .to_raw()
+ .into_raw()
.map_err(|e| ApiError(format!("Failed to read response: {}", e)))
.await?;
let body = str::from_utf8(&body)
.map_err(|e| ApiError(format!("Response was not valid UTF8: {}", e)))?;
- let body = serde_json::from_str::<models::ErrorResponse>(body)?;
+ let body = serde_json::from_str::<models::ErrorResponse>(body).map_err(|e| {
+ ApiError(format!("Response body did not match the schema: {}", e))
+ })?;
Ok(CreateReleaseAutoBatchResponse::NotAuthorized {
body: body,
www_authenticate: response_www_authenticate,
@@ -3674,39 +3861,45 @@ where
403 => {
let body = response.into_body();
let body = body
- .to_raw()
+ .into_raw()
.map_err(|e| ApiError(format!("Failed to read response: {}", e)))
.await?;
let body = str::from_utf8(&body)
.map_err(|e| ApiError(format!("Response was not valid UTF8: {}", e)))?;
- let body = serde_json::from_str::<models::ErrorResponse>(body)?;
+ let body = serde_json::from_str::<models::ErrorResponse>(body).map_err(|e| {
+ ApiError(format!("Response body did not match the schema: {}", e))
+ })?;
Ok(CreateReleaseAutoBatchResponse::Forbidden(body))
}
404 => {
let body = response.into_body();
let body = body
- .to_raw()
+ .into_raw()
.map_err(|e| ApiError(format!("Failed to read response: {}", e)))
.await?;
let body = str::from_utf8(&body)
.map_err(|e| ApiError(format!("Response was not valid UTF8: {}", e)))?;
- let body = serde_json::from_str::<models::ErrorResponse>(body)?;
+ let body = serde_json::from_str::<models::ErrorResponse>(body).map_err(|e| {
+ ApiError(format!("Response body did not match the schema: {}", e))
+ })?;
Ok(CreateReleaseAutoBatchResponse::NotFound(body))
}
500 => {
let body = response.into_body();
let body = body
- .to_raw()
+ .into_raw()
.map_err(|e| ApiError(format!("Failed to read response: {}", e)))
.await?;
let body = str::from_utf8(&body)
.map_err(|e| ApiError(format!("Response was not valid UTF8: {}", e)))?;
- let body = serde_json::from_str::<models::ErrorResponse>(body)?;
+ let body = serde_json::from_str::<models::ErrorResponse>(body).map_err(|e| {
+ ApiError(format!("Response body did not match the schema: {}", e))
+ })?;
Ok(CreateReleaseAutoBatchResponse::GenericError(body))
}
code => {
let headers = response.headers().clone();
- let body = response.into_body().take(100).to_raw().await;
+ let body = response.into_body().take(100).into_raw().await;
Err(ApiError(format!(
"Unexpected response code {}:\n{:?}\n\n{}",
code,
@@ -3828,23 +4021,27 @@ where
201 => {
let body = response.into_body();
let body = body
- .to_raw()
+ .into_raw()
.map_err(|e| ApiError(format!("Failed to read response: {}", e)))
.await?;
let body = str::from_utf8(&body)
.map_err(|e| ApiError(format!("Response was not valid UTF8: {}", e)))?;
- let body = serde_json::from_str::<models::EntityEdit>(body)?;
+ let body = serde_json::from_str::<models::EntityEdit>(body).map_err(|e| {
+ ApiError(format!("Response body did not match the schema: {}", e))
+ })?;
Ok(CreateWebcaptureResponse::CreatedEntity(body))
}
400 => {
let body = response.into_body();
let body = body
- .to_raw()
+ .into_raw()
.map_err(|e| ApiError(format!("Failed to read response: {}", e)))
.await?;
let body = str::from_utf8(&body)
.map_err(|e| ApiError(format!("Response was not valid UTF8: {}", e)))?;
- let body = serde_json::from_str::<models::ErrorResponse>(body)?;
+ let body = serde_json::from_str::<models::ErrorResponse>(body).map_err(|e| {
+ ApiError(format!("Response body did not match the schema: {}", e))
+ })?;
Ok(CreateWebcaptureResponse::BadRequest(body))
}
401 => {
@@ -3872,12 +4069,14 @@ where
let body = response.into_body();
let body = body
- .to_raw()
+ .into_raw()
.map_err(|e| ApiError(format!("Failed to read response: {}", e)))
.await?;
let body = str::from_utf8(&body)
.map_err(|e| ApiError(format!("Response was not valid UTF8: {}", e)))?;
- let body = serde_json::from_str::<models::ErrorResponse>(body)?;
+ let body = serde_json::from_str::<models::ErrorResponse>(body).map_err(|e| {
+ ApiError(format!("Response body did not match the schema: {}", e))
+ })?;
Ok(CreateWebcaptureResponse::NotAuthorized {
body: body,
www_authenticate: response_www_authenticate,
@@ -3886,39 +4085,45 @@ where
403 => {
let body = response.into_body();
let body = body
- .to_raw()
+ .into_raw()
.map_err(|e| ApiError(format!("Failed to read response: {}", e)))
.await?;
let body = str::from_utf8(&body)
.map_err(|e| ApiError(format!("Response was not valid UTF8: {}", e)))?;
- let body = serde_json::from_str::<models::ErrorResponse>(body)?;
+ let body = serde_json::from_str::<models::ErrorResponse>(body).map_err(|e| {
+ ApiError(format!("Response body did not match the schema: {}", e))
+ })?;
Ok(CreateWebcaptureResponse::Forbidden(body))
}
404 => {
let body = response.into_body();
let body = body
- .to_raw()
+ .into_raw()
.map_err(|e| ApiError(format!("Failed to read response: {}", e)))
.await?;
let body = str::from_utf8(&body)
.map_err(|e| ApiError(format!("Response was not valid UTF8: {}", e)))?;
- let body = serde_json::from_str::<models::ErrorResponse>(body)?;
+ let body = serde_json::from_str::<models::ErrorResponse>(body).map_err(|e| {
+ ApiError(format!("Response body did not match the schema: {}", e))
+ })?;
Ok(CreateWebcaptureResponse::NotFound(body))
}
500 => {
let body = response.into_body();
let body = body
- .to_raw()
+ .into_raw()
.map_err(|e| ApiError(format!("Failed to read response: {}", e)))
.await?;
let body = str::from_utf8(&body)
.map_err(|e| ApiError(format!("Response was not valid UTF8: {}", e)))?;
- let body = serde_json::from_str::<models::ErrorResponse>(body)?;
+ let body = serde_json::from_str::<models::ErrorResponse>(body).map_err(|e| {
+ ApiError(format!("Response body did not match the schema: {}", e))
+ })?;
Ok(CreateWebcaptureResponse::GenericError(body))
}
code => {
let headers = response.headers().clone();
- let body = response.into_body().take(100).to_raw().await;
+ let body = response.into_body().take(100).into_raw().await;
Err(ApiError(format!(
"Unexpected response code {}:\n{:?}\n\n{}",
code,
@@ -4035,23 +4240,27 @@ where
201 => {
let body = response.into_body();
let body = body
- .to_raw()
+ .into_raw()
.map_err(|e| ApiError(format!("Failed to read response: {}", e)))
.await?;
let body = str::from_utf8(&body)
.map_err(|e| ApiError(format!("Response was not valid UTF8: {}", e)))?;
- let body = serde_json::from_str::<models::Editgroup>(body)?;
+ let body = serde_json::from_str::<models::Editgroup>(body).map_err(|e| {
+ ApiError(format!("Response body did not match the schema: {}", e))
+ })?;
Ok(CreateWebcaptureAutoBatchResponse::CreatedEditgroup(body))
}
400 => {
let body = response.into_body();
let body = body
- .to_raw()
+ .into_raw()
.map_err(|e| ApiError(format!("Failed to read response: {}", e)))
.await?;
let body = str::from_utf8(&body)
.map_err(|e| ApiError(format!("Response was not valid UTF8: {}", e)))?;
- let body = serde_json::from_str::<models::ErrorResponse>(body)?;
+ let body = serde_json::from_str::<models::ErrorResponse>(body).map_err(|e| {
+ ApiError(format!("Response body did not match the schema: {}", e))
+ })?;
Ok(CreateWebcaptureAutoBatchResponse::BadRequest(body))
}
401 => {
@@ -4079,12 +4288,14 @@ where
let body = response.into_body();
let body = body
- .to_raw()
+ .into_raw()
.map_err(|e| ApiError(format!("Failed to read response: {}", e)))
.await?;
let body = str::from_utf8(&body)
.map_err(|e| ApiError(format!("Response was not valid UTF8: {}", e)))?;
- let body = serde_json::from_str::<models::ErrorResponse>(body)?;
+ let body = serde_json::from_str::<models::ErrorResponse>(body).map_err(|e| {
+ ApiError(format!("Response body did not match the schema: {}", e))
+ })?;
Ok(CreateWebcaptureAutoBatchResponse::NotAuthorized {
body: body,
www_authenticate: response_www_authenticate,
@@ -4093,39 +4304,45 @@ where
403 => {
let body = response.into_body();
let body = body
- .to_raw()
+ .into_raw()
.map_err(|e| ApiError(format!("Failed to read response: {}", e)))
.await?;
let body = str::from_utf8(&body)
.map_err(|e| ApiError(format!("Response was not valid UTF8: {}", e)))?;
- let body = serde_json::from_str::<models::ErrorResponse>(body)?;
+ let body = serde_json::from_str::<models::ErrorResponse>(body).map_err(|e| {
+ ApiError(format!("Response body did not match the schema: {}", e))
+ })?;
Ok(CreateWebcaptureAutoBatchResponse::Forbidden(body))
}
404 => {
let body = response.into_body();
let body = body
- .to_raw()
+ .into_raw()
.map_err(|e| ApiError(format!("Failed to read response: {}", e)))
.await?;
let body = str::from_utf8(&body)
.map_err(|e| ApiError(format!("Response was not valid UTF8: {}", e)))?;
- let body = serde_json::from_str::<models::ErrorResponse>(body)?;
+ let body = serde_json::from_str::<models::ErrorResponse>(body).map_err(|e| {
+ ApiError(format!("Response body did not match the schema: {}", e))
+ })?;
Ok(CreateWebcaptureAutoBatchResponse::NotFound(body))
}
500 => {
let body = response.into_body();
let body = body
- .to_raw()
+ .into_raw()
.map_err(|e| ApiError(format!("Failed to read response: {}", e)))
.await?;
let body = str::from_utf8(&body)
.map_err(|e| ApiError(format!("Response was not valid UTF8: {}", e)))?;
- let body = serde_json::from_str::<models::ErrorResponse>(body)?;
+ let body = serde_json::from_str::<models::ErrorResponse>(body).map_err(|e| {
+ ApiError(format!("Response body did not match the schema: {}", e))
+ })?;
Ok(CreateWebcaptureAutoBatchResponse::GenericError(body))
}
code => {
let headers = response.headers().clone();
- let body = response.into_body().take(100).to_raw().await;
+ let body = response.into_body().take(100).into_raw().await;
Err(ApiError(format!(
"Unexpected response code {}:\n{:?}\n\n{}",
code,
@@ -4247,23 +4464,27 @@ where
201 => {
let body = response.into_body();
let body = body
- .to_raw()
+ .into_raw()
.map_err(|e| ApiError(format!("Failed to read response: {}", e)))
.await?;
let body = str::from_utf8(&body)
.map_err(|e| ApiError(format!("Response was not valid UTF8: {}", e)))?;
- let body = serde_json::from_str::<models::EntityEdit>(body)?;
+ let body = serde_json::from_str::<models::EntityEdit>(body).map_err(|e| {
+ ApiError(format!("Response body did not match the schema: {}", e))
+ })?;
Ok(CreateWorkResponse::CreatedEntity(body))
}
400 => {
let body = response.into_body();
let body = body
- .to_raw()
+ .into_raw()
.map_err(|e| ApiError(format!("Failed to read response: {}", e)))
.await?;
let body = str::from_utf8(&body)
.map_err(|e| ApiError(format!("Response was not valid UTF8: {}", e)))?;
- let body = serde_json::from_str::<models::ErrorResponse>(body)?;
+ let body = serde_json::from_str::<models::ErrorResponse>(body).map_err(|e| {
+ ApiError(format!("Response body did not match the schema: {}", e))
+ })?;
Ok(CreateWorkResponse::BadRequest(body))
}
401 => {
@@ -4291,12 +4512,14 @@ where
let body = response.into_body();
let body = body
- .to_raw()
+ .into_raw()
.map_err(|e| ApiError(format!("Failed to read response: {}", e)))
.await?;
let body = str::from_utf8(&body)
.map_err(|e| ApiError(format!("Response was not valid UTF8: {}", e)))?;
- let body = serde_json::from_str::<models::ErrorResponse>(body)?;
+ let body = serde_json::from_str::<models::ErrorResponse>(body).map_err(|e| {
+ ApiError(format!("Response body did not match the schema: {}", e))
+ })?;
Ok(CreateWorkResponse::NotAuthorized {
body: body,
www_authenticate: response_www_authenticate,
@@ -4305,39 +4528,45 @@ where
403 => {
let body = response.into_body();
let body = body
- .to_raw()
+ .into_raw()
.map_err(|e| ApiError(format!("Failed to read response: {}", e)))
.await?;
let body = str::from_utf8(&body)
.map_err(|e| ApiError(format!("Response was not valid UTF8: {}", e)))?;
- let body = serde_json::from_str::<models::ErrorResponse>(body)?;
+ let body = serde_json::from_str::<models::ErrorResponse>(body).map_err(|e| {
+ ApiError(format!("Response body did not match the schema: {}", e))
+ })?;
Ok(CreateWorkResponse::Forbidden(body))
}
404 => {
let body = response.into_body();
let body = body
- .to_raw()
+ .into_raw()
.map_err(|e| ApiError(format!("Failed to read response: {}", e)))
.await?;
let body = str::from_utf8(&body)
.map_err(|e| ApiError(format!("Response was not valid UTF8: {}", e)))?;
- let body = serde_json::from_str::<models::ErrorResponse>(body)?;
+ let body = serde_json::from_str::<models::ErrorResponse>(body).map_err(|e| {
+ ApiError(format!("Response body did not match the schema: {}", e))
+ })?;
Ok(CreateWorkResponse::NotFound(body))
}
500 => {
let body = response.into_body();
let body = body
- .to_raw()
+ .into_raw()
.map_err(|e| ApiError(format!("Failed to read response: {}", e)))
.await?;
let body = str::from_utf8(&body)
.map_err(|e| ApiError(format!("Response was not valid UTF8: {}", e)))?;
- let body = serde_json::from_str::<models::ErrorResponse>(body)?;
+ let body = serde_json::from_str::<models::ErrorResponse>(body).map_err(|e| {
+ ApiError(format!("Response body did not match the schema: {}", e))
+ })?;
Ok(CreateWorkResponse::GenericError(body))
}
code => {
let headers = response.headers().clone();
- let body = response.into_body().take(100).to_raw().await;
+ let body = response.into_body().take(100).into_raw().await;
Err(ApiError(format!(
"Unexpected response code {}:\n{:?}\n\n{}",
code,
@@ -4454,23 +4683,27 @@ where
201 => {
let body = response.into_body();
let body = body
- .to_raw()
+ .into_raw()
.map_err(|e| ApiError(format!("Failed to read response: {}", e)))
.await?;
let body = str::from_utf8(&body)
.map_err(|e| ApiError(format!("Response was not valid UTF8: {}", e)))?;
- let body = serde_json::from_str::<models::Editgroup>(body)?;
+ let body = serde_json::from_str::<models::Editgroup>(body).map_err(|e| {
+ ApiError(format!("Response body did not match the schema: {}", e))
+ })?;
Ok(CreateWorkAutoBatchResponse::CreatedEditgroup(body))
}
400 => {
let body = response.into_body();
let body = body
- .to_raw()
+ .into_raw()
.map_err(|e| ApiError(format!("Failed to read response: {}", e)))
.await?;
let body = str::from_utf8(&body)
.map_err(|e| ApiError(format!("Response was not valid UTF8: {}", e)))?;
- let body = serde_json::from_str::<models::ErrorResponse>(body)?;
+ let body = serde_json::from_str::<models::ErrorResponse>(body).map_err(|e| {
+ ApiError(format!("Response body did not match the schema: {}", e))
+ })?;
Ok(CreateWorkAutoBatchResponse::BadRequest(body))
}
401 => {
@@ -4498,12 +4731,14 @@ where
let body = response.into_body();
let body = body
- .to_raw()
+ .into_raw()
.map_err(|e| ApiError(format!("Failed to read response: {}", e)))
.await?;
let body = str::from_utf8(&body)
.map_err(|e| ApiError(format!("Response was not valid UTF8: {}", e)))?;
- let body = serde_json::from_str::<models::ErrorResponse>(body)?;
+ let body = serde_json::from_str::<models::ErrorResponse>(body).map_err(|e| {
+ ApiError(format!("Response body did not match the schema: {}", e))
+ })?;
Ok(CreateWorkAutoBatchResponse::NotAuthorized {
body: body,
www_authenticate: response_www_authenticate,
@@ -4512,39 +4747,45 @@ where
403 => {
let body = response.into_body();
let body = body
- .to_raw()
+ .into_raw()
.map_err(|e| ApiError(format!("Failed to read response: {}", e)))
.await?;
let body = str::from_utf8(&body)
.map_err(|e| ApiError(format!("Response was not valid UTF8: {}", e)))?;
- let body = serde_json::from_str::<models::ErrorResponse>(body)?;
+ let body = serde_json::from_str::<models::ErrorResponse>(body).map_err(|e| {
+ ApiError(format!("Response body did not match the schema: {}", e))
+ })?;
Ok(CreateWorkAutoBatchResponse::Forbidden(body))
}
404 => {
let body = response.into_body();
let body = body
- .to_raw()
+ .into_raw()
.map_err(|e| ApiError(format!("Failed to read response: {}", e)))
.await?;
let body = str::from_utf8(&body)
.map_err(|e| ApiError(format!("Response was not valid UTF8: {}", e)))?;
- let body = serde_json::from_str::<models::ErrorResponse>(body)?;
+ let body = serde_json::from_str::<models::ErrorResponse>(body).map_err(|e| {
+ ApiError(format!("Response body did not match the schema: {}", e))
+ })?;
Ok(CreateWorkAutoBatchResponse::NotFound(body))
}
500 => {
let body = response.into_body();
let body = body
- .to_raw()
+ .into_raw()
.map_err(|e| ApiError(format!("Failed to read response: {}", e)))
.await?;
let body = str::from_utf8(&body)
.map_err(|e| ApiError(format!("Response was not valid UTF8: {}", e)))?;
- let body = serde_json::from_str::<models::ErrorResponse>(body)?;
+ let body = serde_json::from_str::<models::ErrorResponse>(body).map_err(|e| {
+ ApiError(format!("Response body did not match the schema: {}", e))
+ })?;
Ok(CreateWorkAutoBatchResponse::GenericError(body))
}
code => {
let headers = response.headers().clone();
- let body = response.into_body().take(100).to_raw().await;
+ let body = response.into_body().take(100).into_raw().await;
Err(ApiError(format!(
"Unexpected response code {}:\n{:?}\n\n{}",
code,
@@ -4650,23 +4891,27 @@ where
200 => {
let body = response.into_body();
let body = body
- .to_raw()
+ .into_raw()
.map_err(|e| ApiError(format!("Failed to read response: {}", e)))
.await?;
let body = str::from_utf8(&body)
.map_err(|e| ApiError(format!("Response was not valid UTF8: {}", e)))?;
- let body = serde_json::from_str::<models::EntityEdit>(body)?;
+ let body = serde_json::from_str::<models::EntityEdit>(body).map_err(|e| {
+ ApiError(format!("Response body did not match the schema: {}", e))
+ })?;
Ok(DeleteContainerResponse::DeletedEntity(body))
}
400 => {
let body = response.into_body();
let body = body
- .to_raw()
+ .into_raw()
.map_err(|e| ApiError(format!("Failed to read response: {}", e)))
.await?;
let body = str::from_utf8(&body)
.map_err(|e| ApiError(format!("Response was not valid UTF8: {}", e)))?;
- let body = serde_json::from_str::<models::ErrorResponse>(body)?;
+ let body = serde_json::from_str::<models::ErrorResponse>(body).map_err(|e| {
+ ApiError(format!("Response body did not match the schema: {}", e))
+ })?;
Ok(DeleteContainerResponse::BadRequest(body))
}
401 => {
@@ -4694,12 +4939,14 @@ where
let body = response.into_body();
let body = body
- .to_raw()
+ .into_raw()
.map_err(|e| ApiError(format!("Failed to read response: {}", e)))
.await?;
let body = str::from_utf8(&body)
.map_err(|e| ApiError(format!("Response was not valid UTF8: {}", e)))?;
- let body = serde_json::from_str::<models::ErrorResponse>(body)?;
+ let body = serde_json::from_str::<models::ErrorResponse>(body).map_err(|e| {
+ ApiError(format!("Response body did not match the schema: {}", e))
+ })?;
Ok(DeleteContainerResponse::NotAuthorized {
body: body,
www_authenticate: response_www_authenticate,
@@ -4708,39 +4955,45 @@ where
403 => {
let body = response.into_body();
let body = body
- .to_raw()
+ .into_raw()
.map_err(|e| ApiError(format!("Failed to read response: {}", e)))
.await?;
let body = str::from_utf8(&body)
.map_err(|e| ApiError(format!("Response was not valid UTF8: {}", e)))?;
- let body = serde_json::from_str::<models::ErrorResponse>(body)?;
+ let body = serde_json::from_str::<models::ErrorResponse>(body).map_err(|e| {
+ ApiError(format!("Response body did not match the schema: {}", e))
+ })?;
Ok(DeleteContainerResponse::Forbidden(body))
}
404 => {
let body = response.into_body();
let body = body
- .to_raw()
+ .into_raw()
.map_err(|e| ApiError(format!("Failed to read response: {}", e)))
.await?;
let body = str::from_utf8(&body)
.map_err(|e| ApiError(format!("Response was not valid UTF8: {}", e)))?;
- let body = serde_json::from_str::<models::ErrorResponse>(body)?;
+ let body = serde_json::from_str::<models::ErrorResponse>(body).map_err(|e| {
+ ApiError(format!("Response body did not match the schema: {}", e))
+ })?;
Ok(DeleteContainerResponse::NotFound(body))
}
500 => {
let body = response.into_body();
let body = body
- .to_raw()
+ .into_raw()
.map_err(|e| ApiError(format!("Failed to read response: {}", e)))
.await?;
let body = str::from_utf8(&body)
.map_err(|e| ApiError(format!("Response was not valid UTF8: {}", e)))?;
- let body = serde_json::from_str::<models::ErrorResponse>(body)?;
+ let body = serde_json::from_str::<models::ErrorResponse>(body).map_err(|e| {
+ ApiError(format!("Response body did not match the schema: {}", e))
+ })?;
Ok(DeleteContainerResponse::GenericError(body))
}
code => {
let headers = response.headers().clone();
- let body = response.into_body().take(100).to_raw().await;
+ let body = response.into_body().take(100).into_raw().await;
Err(ApiError(format!(
"Unexpected response code {}:\n{:?}\n\n{}",
code,
@@ -4846,23 +5099,27 @@ where
200 => {
let body = response.into_body();
let body = body
- .to_raw()
+ .into_raw()
.map_err(|e| ApiError(format!("Failed to read response: {}", e)))
.await?;
let body = str::from_utf8(&body)
.map_err(|e| ApiError(format!("Response was not valid UTF8: {}", e)))?;
- let body = serde_json::from_str::<models::Success>(body)?;
+ let body = serde_json::from_str::<models::Success>(body).map_err(|e| {
+ ApiError(format!("Response body did not match the schema: {}", e))
+ })?;
Ok(DeleteContainerEditResponse::DeletedEdit(body))
}
400 => {
let body = response.into_body();
let body = body
- .to_raw()
+ .into_raw()
.map_err(|e| ApiError(format!("Failed to read response: {}", e)))
.await?;
let body = str::from_utf8(&body)
.map_err(|e| ApiError(format!("Response was not valid UTF8: {}", e)))?;
- let body = serde_json::from_str::<models::ErrorResponse>(body)?;
+ let body = serde_json::from_str::<models::ErrorResponse>(body).map_err(|e| {
+ ApiError(format!("Response body did not match the schema: {}", e))
+ })?;
Ok(DeleteContainerEditResponse::BadRequest(body))
}
401 => {
@@ -4890,12 +5147,14 @@ where
let body = response.into_body();
let body = body
- .to_raw()
+ .into_raw()
.map_err(|e| ApiError(format!("Failed to read response: {}", e)))
.await?;
let body = str::from_utf8(&body)
.map_err(|e| ApiError(format!("Response was not valid UTF8: {}", e)))?;
- let body = serde_json::from_str::<models::ErrorResponse>(body)?;
+ let body = serde_json::from_str::<models::ErrorResponse>(body).map_err(|e| {
+ ApiError(format!("Response body did not match the schema: {}", e))
+ })?;
Ok(DeleteContainerEditResponse::NotAuthorized {
body: body,
www_authenticate: response_www_authenticate,
@@ -4904,39 +5163,45 @@ where
403 => {
let body = response.into_body();
let body = body
- .to_raw()
+ .into_raw()
.map_err(|e| ApiError(format!("Failed to read response: {}", e)))
.await?;
let body = str::from_utf8(&body)
.map_err(|e| ApiError(format!("Response was not valid UTF8: {}", e)))?;
- let body = serde_json::from_str::<models::ErrorResponse>(body)?;
+ let body = serde_json::from_str::<models::ErrorResponse>(body).map_err(|e| {
+ ApiError(format!("Response body did not match the schema: {}", e))
+ })?;
Ok(DeleteContainerEditResponse::Forbidden(body))
}
404 => {
let body = response.into_body();
let body = body
- .to_raw()
+ .into_raw()
.map_err(|e| ApiError(format!("Failed to read response: {}", e)))
.await?;
let body = str::from_utf8(&body)
.map_err(|e| ApiError(format!("Response was not valid UTF8: {}", e)))?;
- let body = serde_json::from_str::<models::ErrorResponse>(body)?;
+ let body = serde_json::from_str::<models::ErrorResponse>(body).map_err(|e| {
+ ApiError(format!("Response body did not match the schema: {}", e))
+ })?;
Ok(DeleteContainerEditResponse::NotFound(body))
}
500 => {
let body = response.into_body();
let body = body
- .to_raw()
+ .into_raw()
.map_err(|e| ApiError(format!("Failed to read response: {}", e)))
.await?;
let body = str::from_utf8(&body)
.map_err(|e| ApiError(format!("Response was not valid UTF8: {}", e)))?;
- let body = serde_json::from_str::<models::ErrorResponse>(body)?;
+ let body = serde_json::from_str::<models::ErrorResponse>(body).map_err(|e| {
+ ApiError(format!("Response body did not match the schema: {}", e))
+ })?;
Ok(DeleteContainerEditResponse::GenericError(body))
}
code => {
let headers = response.headers().clone();
- let body = response.into_body().take(100).to_raw().await;
+ let body = response.into_body().take(100).into_raw().await;
Err(ApiError(format!(
"Unexpected response code {}:\n{:?}\n\n{}",
code,
@@ -5042,23 +5307,27 @@ where
200 => {
let body = response.into_body();
let body = body
- .to_raw()
+ .into_raw()
.map_err(|e| ApiError(format!("Failed to read response: {}", e)))
.await?;
let body = str::from_utf8(&body)
.map_err(|e| ApiError(format!("Response was not valid UTF8: {}", e)))?;
- let body = serde_json::from_str::<models::EntityEdit>(body)?;
+ let body = serde_json::from_str::<models::EntityEdit>(body).map_err(|e| {
+ ApiError(format!("Response body did not match the schema: {}", e))
+ })?;
Ok(DeleteCreatorResponse::DeletedEntity(body))
}
400 => {
let body = response.into_body();
let body = body
- .to_raw()
+ .into_raw()
.map_err(|e| ApiError(format!("Failed to read response: {}", e)))
.await?;
let body = str::from_utf8(&body)
.map_err(|e| ApiError(format!("Response was not valid UTF8: {}", e)))?;
- let body = serde_json::from_str::<models::ErrorResponse>(body)?;
+ let body = serde_json::from_str::<models::ErrorResponse>(body).map_err(|e| {
+ ApiError(format!("Response body did not match the schema: {}", e))
+ })?;
Ok(DeleteCreatorResponse::BadRequest(body))
}
401 => {
@@ -5086,12 +5355,14 @@ where
let body = response.into_body();
let body = body
- .to_raw()
+ .into_raw()
.map_err(|e| ApiError(format!("Failed to read response: {}", e)))
.await?;
let body = str::from_utf8(&body)
.map_err(|e| ApiError(format!("Response was not valid UTF8: {}", e)))?;
- let body = serde_json::from_str::<models::ErrorResponse>(body)?;
+ let body = serde_json::from_str::<models::ErrorResponse>(body).map_err(|e| {
+ ApiError(format!("Response body did not match the schema: {}", e))
+ })?;
Ok(DeleteCreatorResponse::NotAuthorized {
body: body,
www_authenticate: response_www_authenticate,
@@ -5100,39 +5371,45 @@ where
403 => {
let body = response.into_body();
let body = body
- .to_raw()
+ .into_raw()
.map_err(|e| ApiError(format!("Failed to read response: {}", e)))
.await?;
let body = str::from_utf8(&body)
.map_err(|e| ApiError(format!("Response was not valid UTF8: {}", e)))?;
- let body = serde_json::from_str::<models::ErrorResponse>(body)?;
+ let body = serde_json::from_str::<models::ErrorResponse>(body).map_err(|e| {
+ ApiError(format!("Response body did not match the schema: {}", e))
+ })?;
Ok(DeleteCreatorResponse::Forbidden(body))
}
404 => {
let body = response.into_body();
let body = body
- .to_raw()
+ .into_raw()
.map_err(|e| ApiError(format!("Failed to read response: {}", e)))
.await?;
let body = str::from_utf8(&body)
.map_err(|e| ApiError(format!("Response was not valid UTF8: {}", e)))?;
- let body = serde_json::from_str::<models::ErrorResponse>(body)?;
+ let body = serde_json::from_str::<models::ErrorResponse>(body).map_err(|e| {
+ ApiError(format!("Response body did not match the schema: {}", e))
+ })?;
Ok(DeleteCreatorResponse::NotFound(body))
}
500 => {
let body = response.into_body();
let body = body
- .to_raw()
+ .into_raw()
.map_err(|e| ApiError(format!("Failed to read response: {}", e)))
.await?;
let body = str::from_utf8(&body)
.map_err(|e| ApiError(format!("Response was not valid UTF8: {}", e)))?;
- let body = serde_json::from_str::<models::ErrorResponse>(body)?;
+ let body = serde_json::from_str::<models::ErrorResponse>(body).map_err(|e| {
+ ApiError(format!("Response body did not match the schema: {}", e))
+ })?;
Ok(DeleteCreatorResponse::GenericError(body))
}
code => {
let headers = response.headers().clone();
- let body = response.into_body().take(100).to_raw().await;
+ let body = response.into_body().take(100).into_raw().await;
Err(ApiError(format!(
"Unexpected response code {}:\n{:?}\n\n{}",
code,
@@ -5238,23 +5515,27 @@ where
200 => {
let body = response.into_body();
let body = body
- .to_raw()
+ .into_raw()
.map_err(|e| ApiError(format!("Failed to read response: {}", e)))
.await?;
let body = str::from_utf8(&body)
.map_err(|e| ApiError(format!("Response was not valid UTF8: {}", e)))?;
- let body = serde_json::from_str::<models::Success>(body)?;
+ let body = serde_json::from_str::<models::Success>(body).map_err(|e| {
+ ApiError(format!("Response body did not match the schema: {}", e))
+ })?;
Ok(DeleteCreatorEditResponse::DeletedEdit(body))
}
400 => {
let body = response.into_body();
let body = body
- .to_raw()
+ .into_raw()
.map_err(|e| ApiError(format!("Failed to read response: {}", e)))
.await?;
let body = str::from_utf8(&body)
.map_err(|e| ApiError(format!("Response was not valid UTF8: {}", e)))?;
- let body = serde_json::from_str::<models::ErrorResponse>(body)?;
+ let body = serde_json::from_str::<models::ErrorResponse>(body).map_err(|e| {
+ ApiError(format!("Response body did not match the schema: {}", e))
+ })?;
Ok(DeleteCreatorEditResponse::BadRequest(body))
}
401 => {
@@ -5282,12 +5563,14 @@ where
let body = response.into_body();
let body = body
- .to_raw()
+ .into_raw()
.map_err(|e| ApiError(format!("Failed to read response: {}", e)))
.await?;
let body = str::from_utf8(&body)
.map_err(|e| ApiError(format!("Response was not valid UTF8: {}", e)))?;
- let body = serde_json::from_str::<models::ErrorResponse>(body)?;
+ let body = serde_json::from_str::<models::ErrorResponse>(body).map_err(|e| {
+ ApiError(format!("Response body did not match the schema: {}", e))
+ })?;
Ok(DeleteCreatorEditResponse::NotAuthorized {
body: body,
www_authenticate: response_www_authenticate,
@@ -5296,39 +5579,45 @@ where
403 => {
let body = response.into_body();
let body = body
- .to_raw()
+ .into_raw()
.map_err(|e| ApiError(format!("Failed to read response: {}", e)))
.await?;
let body = str::from_utf8(&body)
.map_err(|e| ApiError(format!("Response was not valid UTF8: {}", e)))?;
- let body = serde_json::from_str::<models::ErrorResponse>(body)?;
+ let body = serde_json::from_str::<models::ErrorResponse>(body).map_err(|e| {
+ ApiError(format!("Response body did not match the schema: {}", e))
+ })?;
Ok(DeleteCreatorEditResponse::Forbidden(body))
}
404 => {
let body = response.into_body();
let body = body
- .to_raw()
+ .into_raw()
.map_err(|e| ApiError(format!("Failed to read response: {}", e)))
.await?;
let body = str::from_utf8(&body)
.map_err(|e| ApiError(format!("Response was not valid UTF8: {}", e)))?;
- let body = serde_json::from_str::<models::ErrorResponse>(body)?;
+ let body = serde_json::from_str::<models::ErrorResponse>(body).map_err(|e| {
+ ApiError(format!("Response body did not match the schema: {}", e))
+ })?;
Ok(DeleteCreatorEditResponse::NotFound(body))
}
500 => {
let body = response.into_body();
let body = body
- .to_raw()
+ .into_raw()
.map_err(|e| ApiError(format!("Failed to read response: {}", e)))
.await?;
let body = str::from_utf8(&body)
.map_err(|e| ApiError(format!("Response was not valid UTF8: {}", e)))?;
- let body = serde_json::from_str::<models::ErrorResponse>(body)?;
+ let body = serde_json::from_str::<models::ErrorResponse>(body).map_err(|e| {
+ ApiError(format!("Response body did not match the schema: {}", e))
+ })?;
Ok(DeleteCreatorEditResponse::GenericError(body))
}
code => {
let headers = response.headers().clone();
- let body = response.into_body().take(100).to_raw().await;
+ let body = response.into_body().take(100).into_raw().await;
Err(ApiError(format!(
"Unexpected response code {}:\n{:?}\n\n{}",
code,
@@ -5434,23 +5723,27 @@ where
200 => {
let body = response.into_body();
let body = body
- .to_raw()
+ .into_raw()
.map_err(|e| ApiError(format!("Failed to read response: {}", e)))
.await?;
let body = str::from_utf8(&body)
.map_err(|e| ApiError(format!("Response was not valid UTF8: {}", e)))?;
- let body = serde_json::from_str::<models::EntityEdit>(body)?;
+ let body = serde_json::from_str::<models::EntityEdit>(body).map_err(|e| {
+ ApiError(format!("Response body did not match the schema: {}", e))
+ })?;
Ok(DeleteFileResponse::DeletedEntity(body))
}
400 => {
let body = response.into_body();
let body = body
- .to_raw()
+ .into_raw()
.map_err(|e| ApiError(format!("Failed to read response: {}", e)))
.await?;
let body = str::from_utf8(&body)
.map_err(|e| ApiError(format!("Response was not valid UTF8: {}", e)))?;
- let body = serde_json::from_str::<models::ErrorResponse>(body)?;
+ let body = serde_json::from_str::<models::ErrorResponse>(body).map_err(|e| {
+ ApiError(format!("Response body did not match the schema: {}", e))
+ })?;
Ok(DeleteFileResponse::BadRequest(body))
}
401 => {
@@ -5478,12 +5771,14 @@ where
let body = response.into_body();
let body = body
- .to_raw()
+ .into_raw()
.map_err(|e| ApiError(format!("Failed to read response: {}", e)))
.await?;
let body = str::from_utf8(&body)
.map_err(|e| ApiError(format!("Response was not valid UTF8: {}", e)))?;
- let body = serde_json::from_str::<models::ErrorResponse>(body)?;
+ let body = serde_json::from_str::<models::ErrorResponse>(body).map_err(|e| {
+ ApiError(format!("Response body did not match the schema: {}", e))
+ })?;
Ok(DeleteFileResponse::NotAuthorized {
body: body,
www_authenticate: response_www_authenticate,
@@ -5492,39 +5787,45 @@ where
403 => {
let body = response.into_body();
let body = body
- .to_raw()
+ .into_raw()
.map_err(|e| ApiError(format!("Failed to read response: {}", e)))
.await?;
let body = str::from_utf8(&body)
.map_err(|e| ApiError(format!("Response was not valid UTF8: {}", e)))?;
- let body = serde_json::from_str::<models::ErrorResponse>(body)?;
+ let body = serde_json::from_str::<models::ErrorResponse>(body).map_err(|e| {
+ ApiError(format!("Response body did not match the schema: {}", e))
+ })?;
Ok(DeleteFileResponse::Forbidden(body))
}
404 => {
let body = response.into_body();
let body = body
- .to_raw()
+ .into_raw()
.map_err(|e| ApiError(format!("Failed to read response: {}", e)))
.await?;
let body = str::from_utf8(&body)
.map_err(|e| ApiError(format!("Response was not valid UTF8: {}", e)))?;
- let body = serde_json::from_str::<models::ErrorResponse>(body)?;
+ let body = serde_json::from_str::<models::ErrorResponse>(body).map_err(|e| {
+ ApiError(format!("Response body did not match the schema: {}", e))
+ })?;
Ok(DeleteFileResponse::NotFound(body))
}
500 => {
let body = response.into_body();
let body = body
- .to_raw()
+ .into_raw()
.map_err(|e| ApiError(format!("Failed to read response: {}", e)))
.await?;
let body = str::from_utf8(&body)
.map_err(|e| ApiError(format!("Response was not valid UTF8: {}", e)))?;
- let body = serde_json::from_str::<models::ErrorResponse>(body)?;
+ let body = serde_json::from_str::<models::ErrorResponse>(body).map_err(|e| {
+ ApiError(format!("Response body did not match the schema: {}", e))
+ })?;
Ok(DeleteFileResponse::GenericError(body))
}
code => {
let headers = response.headers().clone();
- let body = response.into_body().take(100).to_raw().await;
+ let body = response.into_body().take(100).into_raw().await;
Err(ApiError(format!(
"Unexpected response code {}:\n{:?}\n\n{}",
code,
@@ -5630,23 +5931,27 @@ where
200 => {
let body = response.into_body();
let body = body
- .to_raw()
+ .into_raw()
.map_err(|e| ApiError(format!("Failed to read response: {}", e)))
.await?;
let body = str::from_utf8(&body)
.map_err(|e| ApiError(format!("Response was not valid UTF8: {}", e)))?;
- let body = serde_json::from_str::<models::Success>(body)?;
+ let body = serde_json::from_str::<models::Success>(body).map_err(|e| {
+ ApiError(format!("Response body did not match the schema: {}", e))
+ })?;
Ok(DeleteFileEditResponse::DeletedEdit(body))
}
400 => {
let body = response.into_body();
let body = body
- .to_raw()
+ .into_raw()
.map_err(|e| ApiError(format!("Failed to read response: {}", e)))
.await?;
let body = str::from_utf8(&body)
.map_err(|e| ApiError(format!("Response was not valid UTF8: {}", e)))?;
- let body = serde_json::from_str::<models::ErrorResponse>(body)?;
+ let body = serde_json::from_str::<models::ErrorResponse>(body).map_err(|e| {
+ ApiError(format!("Response body did not match the schema: {}", e))
+ })?;
Ok(DeleteFileEditResponse::BadRequest(body))
}
401 => {
@@ -5674,12 +5979,14 @@ where
let body = response.into_body();
let body = body
- .to_raw()
+ .into_raw()
.map_err(|e| ApiError(format!("Failed to read response: {}", e)))
.await?;
let body = str::from_utf8(&body)
.map_err(|e| ApiError(format!("Response was not valid UTF8: {}", e)))?;
- let body = serde_json::from_str::<models::ErrorResponse>(body)?;
+ let body = serde_json::from_str::<models::ErrorResponse>(body).map_err(|e| {
+ ApiError(format!("Response body did not match the schema: {}", e))
+ })?;
Ok(DeleteFileEditResponse::NotAuthorized {
body: body,
www_authenticate: response_www_authenticate,
@@ -5688,39 +5995,45 @@ where
403 => {
let body = response.into_body();
let body = body
- .to_raw()
+ .into_raw()
.map_err(|e| ApiError(format!("Failed to read response: {}", e)))
.await?;
let body = str::from_utf8(&body)
.map_err(|e| ApiError(format!("Response was not valid UTF8: {}", e)))?;
- let body = serde_json::from_str::<models::ErrorResponse>(body)?;
+ let body = serde_json::from_str::<models::ErrorResponse>(body).map_err(|e| {
+ ApiError(format!("Response body did not match the schema: {}", e))
+ })?;
Ok(DeleteFileEditResponse::Forbidden(body))
}
404 => {
let body = response.into_body();
let body = body
- .to_raw()
+ .into_raw()
.map_err(|e| ApiError(format!("Failed to read response: {}", e)))
.await?;
let body = str::from_utf8(&body)
.map_err(|e| ApiError(format!("Response was not valid UTF8: {}", e)))?;
- let body = serde_json::from_str::<models::ErrorResponse>(body)?;
+ let body = serde_json::from_str::<models::ErrorResponse>(body).map_err(|e| {
+ ApiError(format!("Response body did not match the schema: {}", e))
+ })?;
Ok(DeleteFileEditResponse::NotFound(body))
}
500 => {
let body = response.into_body();
let body = body
- .to_raw()
+ .into_raw()
.map_err(|e| ApiError(format!("Failed to read response: {}", e)))
.await?;
let body = str::from_utf8(&body)
.map_err(|e| ApiError(format!("Response was not valid UTF8: {}", e)))?;
- let body = serde_json::from_str::<models::ErrorResponse>(body)?;
+ let body = serde_json::from_str::<models::ErrorResponse>(body).map_err(|e| {
+ ApiError(format!("Response body did not match the schema: {}", e))
+ })?;
Ok(DeleteFileEditResponse::GenericError(body))
}
code => {
let headers = response.headers().clone();
- let body = response.into_body().take(100).to_raw().await;
+ let body = response.into_body().take(100).into_raw().await;
Err(ApiError(format!(
"Unexpected response code {}:\n{:?}\n\n{}",
code,
@@ -5826,23 +6139,27 @@ where
200 => {
let body = response.into_body();
let body = body
- .to_raw()
+ .into_raw()
.map_err(|e| ApiError(format!("Failed to read response: {}", e)))
.await?;
let body = str::from_utf8(&body)
.map_err(|e| ApiError(format!("Response was not valid UTF8: {}", e)))?;
- let body = serde_json::from_str::<models::EntityEdit>(body)?;
+ let body = serde_json::from_str::<models::EntityEdit>(body).map_err(|e| {
+ ApiError(format!("Response body did not match the schema: {}", e))
+ })?;
Ok(DeleteFilesetResponse::DeletedEntity(body))
}
400 => {
let body = response.into_body();
let body = body
- .to_raw()
+ .into_raw()
.map_err(|e| ApiError(format!("Failed to read response: {}", e)))
.await?;
let body = str::from_utf8(&body)
.map_err(|e| ApiError(format!("Response was not valid UTF8: {}", e)))?;
- let body = serde_json::from_str::<models::ErrorResponse>(body)?;
+ let body = serde_json::from_str::<models::ErrorResponse>(body).map_err(|e| {
+ ApiError(format!("Response body did not match the schema: {}", e))
+ })?;
Ok(DeleteFilesetResponse::BadRequest(body))
}
401 => {
@@ -5870,12 +6187,14 @@ where
let body = response.into_body();
let body = body
- .to_raw()
+ .into_raw()
.map_err(|e| ApiError(format!("Failed to read response: {}", e)))
.await?;
let body = str::from_utf8(&body)
.map_err(|e| ApiError(format!("Response was not valid UTF8: {}", e)))?;
- let body = serde_json::from_str::<models::ErrorResponse>(body)?;
+ let body = serde_json::from_str::<models::ErrorResponse>(body).map_err(|e| {
+ ApiError(format!("Response body did not match the schema: {}", e))
+ })?;
Ok(DeleteFilesetResponse::NotAuthorized {
body: body,
www_authenticate: response_www_authenticate,
@@ -5884,39 +6203,45 @@ where
403 => {
let body = response.into_body();
let body = body
- .to_raw()
+ .into_raw()
.map_err(|e| ApiError(format!("Failed to read response: {}", e)))
.await?;
let body = str::from_utf8(&body)
.map_err(|e| ApiError(format!("Response was not valid UTF8: {}", e)))?;
- let body = serde_json::from_str::<models::ErrorResponse>(body)?;
+ let body = serde_json::from_str::<models::ErrorResponse>(body).map_err(|e| {
+ ApiError(format!("Response body did not match the schema: {}", e))
+ })?;
Ok(DeleteFilesetResponse::Forbidden(body))
}
404 => {
let body = response.into_body();
let body = body
- .to_raw()
+ .into_raw()
.map_err(|e| ApiError(format!("Failed to read response: {}", e)))
.await?;
let body = str::from_utf8(&body)
.map_err(|e| ApiError(format!("Response was not valid UTF8: {}", e)))?;
- let body = serde_json::from_str::<models::ErrorResponse>(body)?;
+ let body = serde_json::from_str::<models::ErrorResponse>(body).map_err(|e| {
+ ApiError(format!("Response body did not match the schema: {}", e))
+ })?;
Ok(DeleteFilesetResponse::NotFound(body))
}
500 => {
let body = response.into_body();
let body = body
- .to_raw()
+ .into_raw()
.map_err(|e| ApiError(format!("Failed to read response: {}", e)))
.await?;
let body = str::from_utf8(&body)
.map_err(|e| ApiError(format!("Response was not valid UTF8: {}", e)))?;
- let body = serde_json::from_str::<models::ErrorResponse>(body)?;
+ let body = serde_json::from_str::<models::ErrorResponse>(body).map_err(|e| {
+ ApiError(format!("Response body did not match the schema: {}", e))
+ })?;
Ok(DeleteFilesetResponse::GenericError(body))
}
code => {
let headers = response.headers().clone();
- let body = response.into_body().take(100).to_raw().await;
+ let body = response.into_body().take(100).into_raw().await;
Err(ApiError(format!(
"Unexpected response code {}:\n{:?}\n\n{}",
code,
@@ -6022,23 +6347,27 @@ where
200 => {
let body = response.into_body();
let body = body
- .to_raw()
+ .into_raw()
.map_err(|e| ApiError(format!("Failed to read response: {}", e)))
.await?;
let body = str::from_utf8(&body)
.map_err(|e| ApiError(format!("Response was not valid UTF8: {}", e)))?;
- let body = serde_json::from_str::<models::Success>(body)?;
+ let body = serde_json::from_str::<models::Success>(body).map_err(|e| {
+ ApiError(format!("Response body did not match the schema: {}", e))
+ })?;
Ok(DeleteFilesetEditResponse::DeletedEdit(body))
}
400 => {
let body = response.into_body();
let body = body
- .to_raw()
+ .into_raw()
.map_err(|e| ApiError(format!("Failed to read response: {}", e)))
.await?;
let body = str::from_utf8(&body)
.map_err(|e| ApiError(format!("Response was not valid UTF8: {}", e)))?;
- let body = serde_json::from_str::<models::ErrorResponse>(body)?;
+ let body = serde_json::from_str::<models::ErrorResponse>(body).map_err(|e| {
+ ApiError(format!("Response body did not match the schema: {}", e))
+ })?;
Ok(DeleteFilesetEditResponse::BadRequest(body))
}
401 => {
@@ -6066,12 +6395,14 @@ where
let body = response.into_body();
let body = body
- .to_raw()
+ .into_raw()
.map_err(|e| ApiError(format!("Failed to read response: {}", e)))
.await?;
let body = str::from_utf8(&body)
.map_err(|e| ApiError(format!("Response was not valid UTF8: {}", e)))?;
- let body = serde_json::from_str::<models::ErrorResponse>(body)?;
+ let body = serde_json::from_str::<models::ErrorResponse>(body).map_err(|e| {
+ ApiError(format!("Response body did not match the schema: {}", e))
+ })?;
Ok(DeleteFilesetEditResponse::NotAuthorized {
body: body,
www_authenticate: response_www_authenticate,
@@ -6080,39 +6411,45 @@ where
403 => {
let body = response.into_body();
let body = body
- .to_raw()
+ .into_raw()
.map_err(|e| ApiError(format!("Failed to read response: {}", e)))
.await?;
let body = str::from_utf8(&body)
.map_err(|e| ApiError(format!("Response was not valid UTF8: {}", e)))?;
- let body = serde_json::from_str::<models::ErrorResponse>(body)?;
+ let body = serde_json::from_str::<models::ErrorResponse>(body).map_err(|e| {
+ ApiError(format!("Response body did not match the schema: {}", e))
+ })?;
Ok(DeleteFilesetEditResponse::Forbidden(body))
}
404 => {
let body = response.into_body();
let body = body
- .to_raw()
+ .into_raw()
.map_err(|e| ApiError(format!("Failed to read response: {}", e)))
.await?;
let body = str::from_utf8(&body)
.map_err(|e| ApiError(format!("Response was not valid UTF8: {}", e)))?;
- let body = serde_json::from_str::<models::ErrorResponse>(body)?;
+ let body = serde_json::from_str::<models::ErrorResponse>(body).map_err(|e| {
+ ApiError(format!("Response body did not match the schema: {}", e))
+ })?;
Ok(DeleteFilesetEditResponse::NotFound(body))
}
500 => {
let body = response.into_body();
let body = body
- .to_raw()
+ .into_raw()
.map_err(|e| ApiError(format!("Failed to read response: {}", e)))
.await?;
let body = str::from_utf8(&body)
.map_err(|e| ApiError(format!("Response was not valid UTF8: {}", e)))?;
- let body = serde_json::from_str::<models::ErrorResponse>(body)?;
+ let body = serde_json::from_str::<models::ErrorResponse>(body).map_err(|e| {
+ ApiError(format!("Response body did not match the schema: {}", e))
+ })?;
Ok(DeleteFilesetEditResponse::GenericError(body))
}
code => {
let headers = response.headers().clone();
- let body = response.into_body().take(100).to_raw().await;
+ let body = response.into_body().take(100).into_raw().await;
Err(ApiError(format!(
"Unexpected response code {}:\n{:?}\n\n{}",
code,
@@ -6218,23 +6555,27 @@ where
200 => {
let body = response.into_body();
let body = body
- .to_raw()
+ .into_raw()
.map_err(|e| ApiError(format!("Failed to read response: {}", e)))
.await?;
let body = str::from_utf8(&body)
.map_err(|e| ApiError(format!("Response was not valid UTF8: {}", e)))?;
- let body = serde_json::from_str::<models::EntityEdit>(body)?;
+ let body = serde_json::from_str::<models::EntityEdit>(body).map_err(|e| {
+ ApiError(format!("Response body did not match the schema: {}", e))
+ })?;
Ok(DeleteReleaseResponse::DeletedEntity(body))
}
400 => {
let body = response.into_body();
let body = body
- .to_raw()
+ .into_raw()
.map_err(|e| ApiError(format!("Failed to read response: {}", e)))
.await?;
let body = str::from_utf8(&body)
.map_err(|e| ApiError(format!("Response was not valid UTF8: {}", e)))?;
- let body = serde_json::from_str::<models::ErrorResponse>(body)?;
+ let body = serde_json::from_str::<models::ErrorResponse>(body).map_err(|e| {
+ ApiError(format!("Response body did not match the schema: {}", e))
+ })?;
Ok(DeleteReleaseResponse::BadRequest(body))
}
401 => {
@@ -6262,12 +6603,14 @@ where
let body = response.into_body();
let body = body
- .to_raw()
+ .into_raw()
.map_err(|e| ApiError(format!("Failed to read response: {}", e)))
.await?;
let body = str::from_utf8(&body)
.map_err(|e| ApiError(format!("Response was not valid UTF8: {}", e)))?;
- let body = serde_json::from_str::<models::ErrorResponse>(body)?;
+ let body = serde_json::from_str::<models::ErrorResponse>(body).map_err(|e| {
+ ApiError(format!("Response body did not match the schema: {}", e))
+ })?;
Ok(DeleteReleaseResponse::NotAuthorized {
body: body,
www_authenticate: response_www_authenticate,
@@ -6276,39 +6619,45 @@ where
403 => {
let body = response.into_body();
let body = body
- .to_raw()
+ .into_raw()
.map_err(|e| ApiError(format!("Failed to read response: {}", e)))
.await?;
let body = str::from_utf8(&body)
.map_err(|e| ApiError(format!("Response was not valid UTF8: {}", e)))?;
- let body = serde_json::from_str::<models::ErrorResponse>(body)?;
+ let body = serde_json::from_str::<models::ErrorResponse>(body).map_err(|e| {
+ ApiError(format!("Response body did not match the schema: {}", e))
+ })?;
Ok(DeleteReleaseResponse::Forbidden(body))
}
404 => {
let body = response.into_body();
let body = body
- .to_raw()
+ .into_raw()
.map_err(|e| ApiError(format!("Failed to read response: {}", e)))
.await?;
let body = str::from_utf8(&body)
.map_err(|e| ApiError(format!("Response was not valid UTF8: {}", e)))?;
- let body = serde_json::from_str::<models::ErrorResponse>(body)?;
+ let body = serde_json::from_str::<models::ErrorResponse>(body).map_err(|e| {
+ ApiError(format!("Response body did not match the schema: {}", e))
+ })?;
Ok(DeleteReleaseResponse::NotFound(body))
}
500 => {
let body = response.into_body();
let body = body
- .to_raw()
+ .into_raw()
.map_err(|e| ApiError(format!("Failed to read response: {}", e)))
.await?;
let body = str::from_utf8(&body)
.map_err(|e| ApiError(format!("Response was not valid UTF8: {}", e)))?;
- let body = serde_json::from_str::<models::ErrorResponse>(body)?;
+ let body = serde_json::from_str::<models::ErrorResponse>(body).map_err(|e| {
+ ApiError(format!("Response body did not match the schema: {}", e))
+ })?;
Ok(DeleteReleaseResponse::GenericError(body))
}
code => {
let headers = response.headers().clone();
- let body = response.into_body().take(100).to_raw().await;
+ let body = response.into_body().take(100).into_raw().await;
Err(ApiError(format!(
"Unexpected response code {}:\n{:?}\n\n{}",
code,
@@ -6414,23 +6763,27 @@ where
200 => {
let body = response.into_body();
let body = body
- .to_raw()
+ .into_raw()
.map_err(|e| ApiError(format!("Failed to read response: {}", e)))
.await?;
let body = str::from_utf8(&body)
.map_err(|e| ApiError(format!("Response was not valid UTF8: {}", e)))?;
- let body = serde_json::from_str::<models::Success>(body)?;
+ let body = serde_json::from_str::<models::Success>(body).map_err(|e| {
+ ApiError(format!("Response body did not match the schema: {}", e))
+ })?;
Ok(DeleteReleaseEditResponse::DeletedEdit(body))
}
400 => {
let body = response.into_body();
let body = body
- .to_raw()
+ .into_raw()
.map_err(|e| ApiError(format!("Failed to read response: {}", e)))
.await?;
let body = str::from_utf8(&body)
.map_err(|e| ApiError(format!("Response was not valid UTF8: {}", e)))?;
- let body = serde_json::from_str::<models::ErrorResponse>(body)?;
+ let body = serde_json::from_str::<models::ErrorResponse>(body).map_err(|e| {
+ ApiError(format!("Response body did not match the schema: {}", e))
+ })?;
Ok(DeleteReleaseEditResponse::BadRequest(body))
}
401 => {
@@ -6458,12 +6811,14 @@ where
let body = response.into_body();
let body = body
- .to_raw()
+ .into_raw()
.map_err(|e| ApiError(format!("Failed to read response: {}", e)))
.await?;
let body = str::from_utf8(&body)
.map_err(|e| ApiError(format!("Response was not valid UTF8: {}", e)))?;
- let body = serde_json::from_str::<models::ErrorResponse>(body)?;
+ let body = serde_json::from_str::<models::ErrorResponse>(body).map_err(|e| {
+ ApiError(format!("Response body did not match the schema: {}", e))
+ })?;
Ok(DeleteReleaseEditResponse::NotAuthorized {
body: body,
www_authenticate: response_www_authenticate,
@@ -6472,39 +6827,45 @@ where
403 => {
let body = response.into_body();
let body = body
- .to_raw()
+ .into_raw()
.map_err(|e| ApiError(format!("Failed to read response: {}", e)))
.await?;
let body = str::from_utf8(&body)
.map_err(|e| ApiError(format!("Response was not valid UTF8: {}", e)))?;
- let body = serde_json::from_str::<models::ErrorResponse>(body)?;
+ let body = serde_json::from_str::<models::ErrorResponse>(body).map_err(|e| {
+ ApiError(format!("Response body did not match the schema: {}", e))
+ })?;
Ok(DeleteReleaseEditResponse::Forbidden(body))
}
404 => {
let body = response.into_body();
let body = body
- .to_raw()
+ .into_raw()
.map_err(|e| ApiError(format!("Failed to read response: {}", e)))
.await?;
let body = str::from_utf8(&body)
.map_err(|e| ApiError(format!("Response was not valid UTF8: {}", e)))?;
- let body = serde_json::from_str::<models::ErrorResponse>(body)?;
+ let body = serde_json::from_str::<models::ErrorResponse>(body).map_err(|e| {
+ ApiError(format!("Response body did not match the schema: {}", e))
+ })?;
Ok(DeleteReleaseEditResponse::NotFound(body))
}
500 => {
let body = response.into_body();
let body = body
- .to_raw()
+ .into_raw()
.map_err(|e| ApiError(format!("Failed to read response: {}", e)))
.await?;
let body = str::from_utf8(&body)
.map_err(|e| ApiError(format!("Response was not valid UTF8: {}", e)))?;
- let body = serde_json::from_str::<models::ErrorResponse>(body)?;
+ let body = serde_json::from_str::<models::ErrorResponse>(body).map_err(|e| {
+ ApiError(format!("Response body did not match the schema: {}", e))
+ })?;
Ok(DeleteReleaseEditResponse::GenericError(body))
}
code => {
let headers = response.headers().clone();
- let body = response.into_body().take(100).to_raw().await;
+ let body = response.into_body().take(100).into_raw().await;
Err(ApiError(format!(
"Unexpected response code {}:\n{:?}\n\n{}",
code,
@@ -6610,23 +6971,27 @@ where
200 => {
let body = response.into_body();
let body = body
- .to_raw()
+ .into_raw()
.map_err(|e| ApiError(format!("Failed to read response: {}", e)))
.await?;
let body = str::from_utf8(&body)
.map_err(|e| ApiError(format!("Response was not valid UTF8: {}", e)))?;
- let body = serde_json::from_str::<models::EntityEdit>(body)?;
+ let body = serde_json::from_str::<models::EntityEdit>(body).map_err(|e| {
+ ApiError(format!("Response body did not match the schema: {}", e))
+ })?;
Ok(DeleteWebcaptureResponse::DeletedEntity(body))
}
400 => {
let body = response.into_body();
let body = body
- .to_raw()
+ .into_raw()
.map_err(|e| ApiError(format!("Failed to read response: {}", e)))
.await?;
let body = str::from_utf8(&body)
.map_err(|e| ApiError(format!("Response was not valid UTF8: {}", e)))?;
- let body = serde_json::from_str::<models::ErrorResponse>(body)?;
+ let body = serde_json::from_str::<models::ErrorResponse>(body).map_err(|e| {
+ ApiError(format!("Response body did not match the schema: {}", e))
+ })?;
Ok(DeleteWebcaptureResponse::BadRequest(body))
}
401 => {
@@ -6654,12 +7019,14 @@ where
let body = response.into_body();
let body = body
- .to_raw()
+ .into_raw()
.map_err(|e| ApiError(format!("Failed to read response: {}", e)))
.await?;
let body = str::from_utf8(&body)
.map_err(|e| ApiError(format!("Response was not valid UTF8: {}", e)))?;
- let body = serde_json::from_str::<models::ErrorResponse>(body)?;
+ let body = serde_json::from_str::<models::ErrorResponse>(body).map_err(|e| {
+ ApiError(format!("Response body did not match the schema: {}", e))
+ })?;
Ok(DeleteWebcaptureResponse::NotAuthorized {
body: body,
www_authenticate: response_www_authenticate,
@@ -6668,39 +7035,45 @@ where
403 => {
let body = response.into_body();
let body = body
- .to_raw()
+ .into_raw()
.map_err(|e| ApiError(format!("Failed to read response: {}", e)))
.await?;
let body = str::from_utf8(&body)
.map_err(|e| ApiError(format!("Response was not valid UTF8: {}", e)))?;
- let body = serde_json::from_str::<models::ErrorResponse>(body)?;
+ let body = serde_json::from_str::<models::ErrorResponse>(body).map_err(|e| {
+ ApiError(format!("Response body did not match the schema: {}", e))
+ })?;
Ok(DeleteWebcaptureResponse::Forbidden(body))
}
404 => {
let body = response.into_body();
let body = body
- .to_raw()
+ .into_raw()
.map_err(|e| ApiError(format!("Failed to read response: {}", e)))
.await?;
let body = str::from_utf8(&body)
.map_err(|e| ApiError(format!("Response was not valid UTF8: {}", e)))?;
- let body = serde_json::from_str::<models::ErrorResponse>(body)?;
+ let body = serde_json::from_str::<models::ErrorResponse>(body).map_err(|e| {
+ ApiError(format!("Response body did not match the schema: {}", e))
+ })?;
Ok(DeleteWebcaptureResponse::NotFound(body))
}
500 => {
let body = response.into_body();
let body = body
- .to_raw()
+ .into_raw()
.map_err(|e| ApiError(format!("Failed to read response: {}", e)))
.await?;
let body = str::from_utf8(&body)
.map_err(|e| ApiError(format!("Response was not valid UTF8: {}", e)))?;
- let body = serde_json::from_str::<models::ErrorResponse>(body)?;
+ let body = serde_json::from_str::<models::ErrorResponse>(body).map_err(|e| {
+ ApiError(format!("Response body did not match the schema: {}", e))
+ })?;
Ok(DeleteWebcaptureResponse::GenericError(body))
}
code => {
let headers = response.headers().clone();
- let body = response.into_body().take(100).to_raw().await;
+ let body = response.into_body().take(100).into_raw().await;
Err(ApiError(format!(
"Unexpected response code {}:\n{:?}\n\n{}",
code,
@@ -6806,23 +7179,27 @@ where
200 => {
let body = response.into_body();
let body = body
- .to_raw()
+ .into_raw()
.map_err(|e| ApiError(format!("Failed to read response: {}", e)))
.await?;
let body = str::from_utf8(&body)
.map_err(|e| ApiError(format!("Response was not valid UTF8: {}", e)))?;
- let body = serde_json::from_str::<models::Success>(body)?;
+ let body = serde_json::from_str::<models::Success>(body).map_err(|e| {
+ ApiError(format!("Response body did not match the schema: {}", e))
+ })?;
Ok(DeleteWebcaptureEditResponse::DeletedEdit(body))
}
400 => {
let body = response.into_body();
let body = body
- .to_raw()
+ .into_raw()
.map_err(|e| ApiError(format!("Failed to read response: {}", e)))
.await?;
let body = str::from_utf8(&body)
.map_err(|e| ApiError(format!("Response was not valid UTF8: {}", e)))?;
- let body = serde_json::from_str::<models::ErrorResponse>(body)?;
+ let body = serde_json::from_str::<models::ErrorResponse>(body).map_err(|e| {
+ ApiError(format!("Response body did not match the schema: {}", e))
+ })?;
Ok(DeleteWebcaptureEditResponse::BadRequest(body))
}
401 => {
@@ -6850,12 +7227,14 @@ where
let body = response.into_body();
let body = body
- .to_raw()
+ .into_raw()
.map_err(|e| ApiError(format!("Failed to read response: {}", e)))
.await?;
let body = str::from_utf8(&body)
.map_err(|e| ApiError(format!("Response was not valid UTF8: {}", e)))?;
- let body = serde_json::from_str::<models::ErrorResponse>(body)?;
+ let body = serde_json::from_str::<models::ErrorResponse>(body).map_err(|e| {
+ ApiError(format!("Response body did not match the schema: {}", e))
+ })?;
Ok(DeleteWebcaptureEditResponse::NotAuthorized {
body: body,
www_authenticate: response_www_authenticate,
@@ -6864,39 +7243,45 @@ where
403 => {
let body = response.into_body();
let body = body
- .to_raw()
+ .into_raw()
.map_err(|e| ApiError(format!("Failed to read response: {}", e)))
.await?;
let body = str::from_utf8(&body)
.map_err(|e| ApiError(format!("Response was not valid UTF8: {}", e)))?;
- let body = serde_json::from_str::<models::ErrorResponse>(body)?;
+ let body = serde_json::from_str::<models::ErrorResponse>(body).map_err(|e| {
+ ApiError(format!("Response body did not match the schema: {}", e))
+ })?;
Ok(DeleteWebcaptureEditResponse::Forbidden(body))
}
404 => {
let body = response.into_body();
let body = body
- .to_raw()
+ .into_raw()
.map_err(|e| ApiError(format!("Failed to read response: {}", e)))
.await?;
let body = str::from_utf8(&body)
.map_err(|e| ApiError(format!("Response was not valid UTF8: {}", e)))?;
- let body = serde_json::from_str::<models::ErrorResponse>(body)?;
+ let body = serde_json::from_str::<models::ErrorResponse>(body).map_err(|e| {
+ ApiError(format!("Response body did not match the schema: {}", e))
+ })?;
Ok(DeleteWebcaptureEditResponse::NotFound(body))
}
500 => {
let body = response.into_body();
let body = body
- .to_raw()
+ .into_raw()
.map_err(|e| ApiError(format!("Failed to read response: {}", e)))
.await?;
let body = str::from_utf8(&body)
.map_err(|e| ApiError(format!("Response was not valid UTF8: {}", e)))?;
- let body = serde_json::from_str::<models::ErrorResponse>(body)?;
+ let body = serde_json::from_str::<models::ErrorResponse>(body).map_err(|e| {
+ ApiError(format!("Response body did not match the schema: {}", e))
+ })?;
Ok(DeleteWebcaptureEditResponse::GenericError(body))
}
code => {
let headers = response.headers().clone();
- let body = response.into_body().take(100).to_raw().await;
+ let body = response.into_body().take(100).into_raw().await;
Err(ApiError(format!(
"Unexpected response code {}:\n{:?}\n\n{}",
code,
@@ -7002,23 +7387,27 @@ where
200 => {
let body = response.into_body();
let body = body
- .to_raw()
+ .into_raw()
.map_err(|e| ApiError(format!("Failed to read response: {}", e)))
.await?;
let body = str::from_utf8(&body)
.map_err(|e| ApiError(format!("Response was not valid UTF8: {}", e)))?;
- let body = serde_json::from_str::<models::EntityEdit>(body)?;
+ let body = serde_json::from_str::<models::EntityEdit>(body).map_err(|e| {
+ ApiError(format!("Response body did not match the schema: {}", e))
+ })?;
Ok(DeleteWorkResponse::DeletedEntity(body))
}
400 => {
let body = response.into_body();
let body = body
- .to_raw()
+ .into_raw()
.map_err(|e| ApiError(format!("Failed to read response: {}", e)))
.await?;
let body = str::from_utf8(&body)
.map_err(|e| ApiError(format!("Response was not valid UTF8: {}", e)))?;
- let body = serde_json::from_str::<models::ErrorResponse>(body)?;
+ let body = serde_json::from_str::<models::ErrorResponse>(body).map_err(|e| {
+ ApiError(format!("Response body did not match the schema: {}", e))
+ })?;
Ok(DeleteWorkResponse::BadRequest(body))
}
401 => {
@@ -7046,12 +7435,14 @@ where
let body = response.into_body();
let body = body
- .to_raw()
+ .into_raw()
.map_err(|e| ApiError(format!("Failed to read response: {}", e)))
.await?;
let body = str::from_utf8(&body)
.map_err(|e| ApiError(format!("Response was not valid UTF8: {}", e)))?;
- let body = serde_json::from_str::<models::ErrorResponse>(body)?;
+ let body = serde_json::from_str::<models::ErrorResponse>(body).map_err(|e| {
+ ApiError(format!("Response body did not match the schema: {}", e))
+ })?;
Ok(DeleteWorkResponse::NotAuthorized {
body: body,
www_authenticate: response_www_authenticate,
@@ -7060,39 +7451,45 @@ where
403 => {
let body = response.into_body();
let body = body
- .to_raw()
+ .into_raw()
.map_err(|e| ApiError(format!("Failed to read response: {}", e)))
.await?;
let body = str::from_utf8(&body)
.map_err(|e| ApiError(format!("Response was not valid UTF8: {}", e)))?;
- let body = serde_json::from_str::<models::ErrorResponse>(body)?;
+ let body = serde_json::from_str::<models::ErrorResponse>(body).map_err(|e| {
+ ApiError(format!("Response body did not match the schema: {}", e))
+ })?;
Ok(DeleteWorkResponse::Forbidden(body))
}
404 => {
let body = response.into_body();
let body = body
- .to_raw()
+ .into_raw()
.map_err(|e| ApiError(format!("Failed to read response: {}", e)))
.await?;
let body = str::from_utf8(&body)
.map_err(|e| ApiError(format!("Response was not valid UTF8: {}", e)))?;
- let body = serde_json::from_str::<models::ErrorResponse>(body)?;
+ let body = serde_json::from_str::<models::ErrorResponse>(body).map_err(|e| {
+ ApiError(format!("Response body did not match the schema: {}", e))
+ })?;
Ok(DeleteWorkResponse::NotFound(body))
}
500 => {
let body = response.into_body();
let body = body
- .to_raw()
+ .into_raw()
.map_err(|e| ApiError(format!("Failed to read response: {}", e)))
.await?;
let body = str::from_utf8(&body)
.map_err(|e| ApiError(format!("Response was not valid UTF8: {}", e)))?;
- let body = serde_json::from_str::<models::ErrorResponse>(body)?;
+ let body = serde_json::from_str::<models::ErrorResponse>(body).map_err(|e| {
+ ApiError(format!("Response body did not match the schema: {}", e))
+ })?;
Ok(DeleteWorkResponse::GenericError(body))
}
code => {
let headers = response.headers().clone();
- let body = response.into_body().take(100).to_raw().await;
+ let body = response.into_body().take(100).into_raw().await;
Err(ApiError(format!(
"Unexpected response code {}:\n{:?}\n\n{}",
code,
@@ -7198,23 +7595,27 @@ where
200 => {
let body = response.into_body();
let body = body
- .to_raw()
+ .into_raw()
.map_err(|e| ApiError(format!("Failed to read response: {}", e)))
.await?;
let body = str::from_utf8(&body)
.map_err(|e| ApiError(format!("Response was not valid UTF8: {}", e)))?;
- let body = serde_json::from_str::<models::Success>(body)?;
+ let body = serde_json::from_str::<models::Success>(body).map_err(|e| {
+ ApiError(format!("Response body did not match the schema: {}", e))
+ })?;
Ok(DeleteWorkEditResponse::DeletedEdit(body))
}
400 => {
let body = response.into_body();
let body = body
- .to_raw()
+ .into_raw()
.map_err(|e| ApiError(format!("Failed to read response: {}", e)))
.await?;
let body = str::from_utf8(&body)
.map_err(|e| ApiError(format!("Response was not valid UTF8: {}", e)))?;
- let body = serde_json::from_str::<models::ErrorResponse>(body)?;
+ let body = serde_json::from_str::<models::ErrorResponse>(body).map_err(|e| {
+ ApiError(format!("Response body did not match the schema: {}", e))
+ })?;
Ok(DeleteWorkEditResponse::BadRequest(body))
}
401 => {
@@ -7242,12 +7643,14 @@ where
let body = response.into_body();
let body = body
- .to_raw()
+ .into_raw()
.map_err(|e| ApiError(format!("Failed to read response: {}", e)))
.await?;
let body = str::from_utf8(&body)
.map_err(|e| ApiError(format!("Response was not valid UTF8: {}", e)))?;
- let body = serde_json::from_str::<models::ErrorResponse>(body)?;
+ let body = serde_json::from_str::<models::ErrorResponse>(body).map_err(|e| {
+ ApiError(format!("Response body did not match the schema: {}", e))
+ })?;
Ok(DeleteWorkEditResponse::NotAuthorized {
body: body,
www_authenticate: response_www_authenticate,
@@ -7256,39 +7659,45 @@ where
403 => {
let body = response.into_body();
let body = body
- .to_raw()
+ .into_raw()
.map_err(|e| ApiError(format!("Failed to read response: {}", e)))
.await?;
let body = str::from_utf8(&body)
.map_err(|e| ApiError(format!("Response was not valid UTF8: {}", e)))?;
- let body = serde_json::from_str::<models::ErrorResponse>(body)?;
+ let body = serde_json::from_str::<models::ErrorResponse>(body).map_err(|e| {
+ ApiError(format!("Response body did not match the schema: {}", e))
+ })?;
Ok(DeleteWorkEditResponse::Forbidden(body))
}
404 => {
let body = response.into_body();
let body = body
- .to_raw()
+ .into_raw()
.map_err(|e| ApiError(format!("Failed to read response: {}", e)))
.await?;
let body = str::from_utf8(&body)
.map_err(|e| ApiError(format!("Response was not valid UTF8: {}", e)))?;
- let body = serde_json::from_str::<models::ErrorResponse>(body)?;
+ let body = serde_json::from_str::<models::ErrorResponse>(body).map_err(|e| {
+ ApiError(format!("Response body did not match the schema: {}", e))
+ })?;
Ok(DeleteWorkEditResponse::NotFound(body))
}
500 => {
let body = response.into_body();
let body = body
- .to_raw()
+ .into_raw()
.map_err(|e| ApiError(format!("Failed to read response: {}", e)))
.await?;
let body = str::from_utf8(&body)
.map_err(|e| ApiError(format!("Response was not valid UTF8: {}", e)))?;
- let body = serde_json::from_str::<models::ErrorResponse>(body)?;
+ let body = serde_json::from_str::<models::ErrorResponse>(body).map_err(|e| {
+ ApiError(format!("Response body did not match the schema: {}", e))
+ })?;
Ok(DeleteWorkEditResponse::GenericError(body))
}
code => {
let headers = response.headers().clone();
- let body = response.into_body().take(100).to_raw().await;
+ let body = response.into_body().take(100).into_raw().await;
Err(ApiError(format!(
"Unexpected response code {}:\n{:?}\n\n{}",
code,
@@ -7369,39 +7778,46 @@ where
200 => {
let body = response.into_body();
let body = body
- .to_raw()
+ .into_raw()
.map_err(|e| ApiError(format!("Failed to read response: {}", e)))
.await?;
let body = str::from_utf8(&body)
.map_err(|e| ApiError(format!("Response was not valid UTF8: {}", e)))?;
- let body = serde_json::from_str::<Vec<models::ChangelogEntry>>(body)?;
+ let body =
+ serde_json::from_str::<Vec<models::ChangelogEntry>>(body).map_err(|e| {
+ ApiError(format!("Response body did not match the schema: {}", e))
+ })?;
Ok(GetChangelogResponse::Success(body))
}
400 => {
let body = response.into_body();
let body = body
- .to_raw()
+ .into_raw()
.map_err(|e| ApiError(format!("Failed to read response: {}", e)))
.await?;
let body = str::from_utf8(&body)
.map_err(|e| ApiError(format!("Response was not valid UTF8: {}", e)))?;
- let body = serde_json::from_str::<models::ErrorResponse>(body)?;
+ let body = serde_json::from_str::<models::ErrorResponse>(body).map_err(|e| {
+ ApiError(format!("Response body did not match the schema: {}", e))
+ })?;
Ok(GetChangelogResponse::BadRequest(body))
}
500 => {
let body = response.into_body();
let body = body
- .to_raw()
+ .into_raw()
.map_err(|e| ApiError(format!("Failed to read response: {}", e)))
.await?;
let body = str::from_utf8(&body)
.map_err(|e| ApiError(format!("Response was not valid UTF8: {}", e)))?;
- let body = serde_json::from_str::<models::ErrorResponse>(body)?;
+ let body = serde_json::from_str::<models::ErrorResponse>(body).map_err(|e| {
+ ApiError(format!("Response body did not match the schema: {}", e))
+ })?;
Ok(GetChangelogResponse::GenericError(body))
}
code => {
let headers = response.headers().clone();
- let body = response.into_body().take(100).to_raw().await;
+ let body = response.into_body().take(100).into_raw().await;
Err(ApiError(format!(
"Unexpected response code {}:\n{:?}\n\n{}",
code,
@@ -7483,50 +7899,58 @@ where
200 => {
let body = response.into_body();
let body = body
- .to_raw()
+ .into_raw()
.map_err(|e| ApiError(format!("Failed to read response: {}", e)))
.await?;
let body = str::from_utf8(&body)
.map_err(|e| ApiError(format!("Response was not valid UTF8: {}", e)))?;
- let body = serde_json::from_str::<models::ChangelogEntry>(body)?;
+ let body = serde_json::from_str::<models::ChangelogEntry>(body).map_err(|e| {
+ ApiError(format!("Response body did not match the schema: {}", e))
+ })?;
Ok(GetChangelogEntryResponse::FoundChangelogEntry(body))
}
400 => {
let body = response.into_body();
let body = body
- .to_raw()
+ .into_raw()
.map_err(|e| ApiError(format!("Failed to read response: {}", e)))
.await?;
let body = str::from_utf8(&body)
.map_err(|e| ApiError(format!("Response was not valid UTF8: {}", e)))?;
- let body = serde_json::from_str::<models::ErrorResponse>(body)?;
+ let body = serde_json::from_str::<models::ErrorResponse>(body).map_err(|e| {
+ ApiError(format!("Response body did not match the schema: {}", e))
+ })?;
Ok(GetChangelogEntryResponse::BadRequest(body))
}
404 => {
let body = response.into_body();
let body = body
- .to_raw()
+ .into_raw()
.map_err(|e| ApiError(format!("Failed to read response: {}", e)))
.await?;
let body = str::from_utf8(&body)
.map_err(|e| ApiError(format!("Response was not valid UTF8: {}", e)))?;
- let body = serde_json::from_str::<models::ErrorResponse>(body)?;
+ let body = serde_json::from_str::<models::ErrorResponse>(body).map_err(|e| {
+ ApiError(format!("Response body did not match the schema: {}", e))
+ })?;
Ok(GetChangelogEntryResponse::NotFound(body))
}
500 => {
let body = response.into_body();
let body = body
- .to_raw()
+ .into_raw()
.map_err(|e| ApiError(format!("Failed to read response: {}", e)))
.await?;
let body = str::from_utf8(&body)
.map_err(|e| ApiError(format!("Response was not valid UTF8: {}", e)))?;
- let body = serde_json::from_str::<models::ErrorResponse>(body)?;
+ let body = serde_json::from_str::<models::ErrorResponse>(body).map_err(|e| {
+ ApiError(format!("Response body did not match the schema: {}", e))
+ })?;
Ok(GetChangelogEntryResponse::GenericError(body))
}
code => {
let headers = response.headers().clone();
- let body = response.into_body().take(100).to_raw().await;
+ let body = response.into_body().take(100).into_raw().await;
Err(ApiError(format!(
"Unexpected response code {}:\n{:?}\n\n{}",
code,
@@ -7616,50 +8040,58 @@ where
200 => {
let body = response.into_body();
let body = body
- .to_raw()
+ .into_raw()
.map_err(|e| ApiError(format!("Failed to read response: {}", e)))
.await?;
let body = str::from_utf8(&body)
.map_err(|e| ApiError(format!("Response was not valid UTF8: {}", e)))?;
- let body = serde_json::from_str::<models::ContainerEntity>(body)?;
+ let body = serde_json::from_str::<models::ContainerEntity>(body).map_err(|e| {
+ ApiError(format!("Response body did not match the schema: {}", e))
+ })?;
Ok(GetContainerResponse::FoundEntity(body))
}
400 => {
let body = response.into_body();
let body = body
- .to_raw()
+ .into_raw()
.map_err(|e| ApiError(format!("Failed to read response: {}", e)))
.await?;
let body = str::from_utf8(&body)
.map_err(|e| ApiError(format!("Response was not valid UTF8: {}", e)))?;
- let body = serde_json::from_str::<models::ErrorResponse>(body)?;
+ let body = serde_json::from_str::<models::ErrorResponse>(body).map_err(|e| {
+ ApiError(format!("Response body did not match the schema: {}", e))
+ })?;
Ok(GetContainerResponse::BadRequest(body))
}
404 => {
let body = response.into_body();
let body = body
- .to_raw()
+ .into_raw()
.map_err(|e| ApiError(format!("Failed to read response: {}", e)))
.await?;
let body = str::from_utf8(&body)
.map_err(|e| ApiError(format!("Response was not valid UTF8: {}", e)))?;
- let body = serde_json::from_str::<models::ErrorResponse>(body)?;
+ let body = serde_json::from_str::<models::ErrorResponse>(body).map_err(|e| {
+ ApiError(format!("Response body did not match the schema: {}", e))
+ })?;
Ok(GetContainerResponse::NotFound(body))
}
500 => {
let body = response.into_body();
let body = body
- .to_raw()
+ .into_raw()
.map_err(|e| ApiError(format!("Failed to read response: {}", e)))
.await?;
let body = str::from_utf8(&body)
.map_err(|e| ApiError(format!("Response was not valid UTF8: {}", e)))?;
- let body = serde_json::from_str::<models::ErrorResponse>(body)?;
+ let body = serde_json::from_str::<models::ErrorResponse>(body).map_err(|e| {
+ ApiError(format!("Response body did not match the schema: {}", e))
+ })?;
Ok(GetContainerResponse::GenericError(body))
}
code => {
let headers = response.headers().clone();
- let body = response.into_body().take(100).to_raw().await;
+ let body = response.into_body().take(100).into_raw().await;
Err(ApiError(format!(
"Unexpected response code {}:\n{:?}\n\n{}",
code,
@@ -7741,50 +8173,58 @@ where
200 => {
let body = response.into_body();
let body = body
- .to_raw()
+ .into_raw()
.map_err(|e| ApiError(format!("Failed to read response: {}", e)))
.await?;
let body = str::from_utf8(&body)
.map_err(|e| ApiError(format!("Response was not valid UTF8: {}", e)))?;
- let body = serde_json::from_str::<models::EntityEdit>(body)?;
+ let body = serde_json::from_str::<models::EntityEdit>(body).map_err(|e| {
+ ApiError(format!("Response body did not match the schema: {}", e))
+ })?;
Ok(GetContainerEditResponse::FoundEdit(body))
}
400 => {
let body = response.into_body();
let body = body
- .to_raw()
+ .into_raw()
.map_err(|e| ApiError(format!("Failed to read response: {}", e)))
.await?;
let body = str::from_utf8(&body)
.map_err(|e| ApiError(format!("Response was not valid UTF8: {}", e)))?;
- let body = serde_json::from_str::<models::ErrorResponse>(body)?;
+ let body = serde_json::from_str::<models::ErrorResponse>(body).map_err(|e| {
+ ApiError(format!("Response body did not match the schema: {}", e))
+ })?;
Ok(GetContainerEditResponse::BadRequest(body))
}
404 => {
let body = response.into_body();
let body = body
- .to_raw()
+ .into_raw()
.map_err(|e| ApiError(format!("Failed to read response: {}", e)))
.await?;
let body = str::from_utf8(&body)
.map_err(|e| ApiError(format!("Response was not valid UTF8: {}", e)))?;
- let body = serde_json::from_str::<models::ErrorResponse>(body)?;
+ let body = serde_json::from_str::<models::ErrorResponse>(body).map_err(|e| {
+ ApiError(format!("Response body did not match the schema: {}", e))
+ })?;
Ok(GetContainerEditResponse::NotFound(body))
}
500 => {
let body = response.into_body();
let body = body
- .to_raw()
+ .into_raw()
.map_err(|e| ApiError(format!("Failed to read response: {}", e)))
.await?;
let body = str::from_utf8(&body)
.map_err(|e| ApiError(format!("Response was not valid UTF8: {}", e)))?;
- let body = serde_json::from_str::<models::ErrorResponse>(body)?;
+ let body = serde_json::from_str::<models::ErrorResponse>(body).map_err(|e| {
+ ApiError(format!("Response body did not match the schema: {}", e))
+ })?;
Ok(GetContainerEditResponse::GenericError(body))
}
code => {
let headers = response.headers().clone();
- let body = response.into_body().take(100).to_raw().await;
+ let body = response.into_body().take(100).into_raw().await;
Err(ApiError(format!(
"Unexpected response code {}:\n{:?}\n\n{}",
code,
@@ -7870,50 +8310,59 @@ where
200 => {
let body = response.into_body();
let body = body
- .to_raw()
+ .into_raw()
.map_err(|e| ApiError(format!("Failed to read response: {}", e)))
.await?;
let body = str::from_utf8(&body)
.map_err(|e| ApiError(format!("Response was not valid UTF8: {}", e)))?;
- let body = serde_json::from_str::<Vec<models::EntityHistoryEntry>>(body)?;
+ let body =
+ serde_json::from_str::<Vec<models::EntityHistoryEntry>>(body).map_err(|e| {
+ ApiError(format!("Response body did not match the schema: {}", e))
+ })?;
Ok(GetContainerHistoryResponse::FoundEntityHistory(body))
}
400 => {
let body = response.into_body();
let body = body
- .to_raw()
+ .into_raw()
.map_err(|e| ApiError(format!("Failed to read response: {}", e)))
.await?;
let body = str::from_utf8(&body)
.map_err(|e| ApiError(format!("Response was not valid UTF8: {}", e)))?;
- let body = serde_json::from_str::<models::ErrorResponse>(body)?;
+ let body = serde_json::from_str::<models::ErrorResponse>(body).map_err(|e| {
+ ApiError(format!("Response body did not match the schema: {}", e))
+ })?;
Ok(GetContainerHistoryResponse::BadRequest(body))
}
404 => {
let body = response.into_body();
let body = body
- .to_raw()
+ .into_raw()
.map_err(|e| ApiError(format!("Failed to read response: {}", e)))
.await?;
let body = str::from_utf8(&body)
.map_err(|e| ApiError(format!("Response was not valid UTF8: {}", e)))?;
- let body = serde_json::from_str::<models::ErrorResponse>(body)?;
+ let body = serde_json::from_str::<models::ErrorResponse>(body).map_err(|e| {
+ ApiError(format!("Response body did not match the schema: {}", e))
+ })?;
Ok(GetContainerHistoryResponse::NotFound(body))
}
500 => {
let body = response.into_body();
let body = body
- .to_raw()
+ .into_raw()
.map_err(|e| ApiError(format!("Failed to read response: {}", e)))
.await?;
let body = str::from_utf8(&body)
.map_err(|e| ApiError(format!("Response was not valid UTF8: {}", e)))?;
- let body = serde_json::from_str::<models::ErrorResponse>(body)?;
+ let body = serde_json::from_str::<models::ErrorResponse>(body).map_err(|e| {
+ ApiError(format!("Response body did not match the schema: {}", e))
+ })?;
Ok(GetContainerHistoryResponse::GenericError(body))
}
code => {
let headers = response.headers().clone();
- let body = response.into_body().take(100).to_raw().await;
+ let body = response.into_body().take(100).into_raw().await;
Err(ApiError(format!(
"Unexpected response code {}:\n{:?}\n\n{}",
code,
@@ -7995,50 +8444,58 @@ where
200 => {
let body = response.into_body();
let body = body
- .to_raw()
+ .into_raw()
.map_err(|e| ApiError(format!("Failed to read response: {}", e)))
.await?;
let body = str::from_utf8(&body)
.map_err(|e| ApiError(format!("Response was not valid UTF8: {}", e)))?;
- let body = serde_json::from_str::<Vec<String>>(body)?;
+ let body = serde_json::from_str::<Vec<String>>(body).map_err(|e| {
+ ApiError(format!("Response body did not match the schema: {}", e))
+ })?;
Ok(GetContainerRedirectsResponse::FoundEntityRedirects(body))
}
400 => {
let body = response.into_body();
let body = body
- .to_raw()
+ .into_raw()
.map_err(|e| ApiError(format!("Failed to read response: {}", e)))
.await?;
let body = str::from_utf8(&body)
.map_err(|e| ApiError(format!("Response was not valid UTF8: {}", e)))?;
- let body = serde_json::from_str::<models::ErrorResponse>(body)?;
+ let body = serde_json::from_str::<models::ErrorResponse>(body).map_err(|e| {
+ ApiError(format!("Response body did not match the schema: {}", e))
+ })?;
Ok(GetContainerRedirectsResponse::BadRequest(body))
}
404 => {
let body = response.into_body();
let body = body
- .to_raw()
+ .into_raw()
.map_err(|e| ApiError(format!("Failed to read response: {}", e)))
.await?;
let body = str::from_utf8(&body)
.map_err(|e| ApiError(format!("Response was not valid UTF8: {}", e)))?;
- let body = serde_json::from_str::<models::ErrorResponse>(body)?;
+ let body = serde_json::from_str::<models::ErrorResponse>(body).map_err(|e| {
+ ApiError(format!("Response body did not match the schema: {}", e))
+ })?;
Ok(GetContainerRedirectsResponse::NotFound(body))
}
500 => {
let body = response.into_body();
let body = body
- .to_raw()
+ .into_raw()
.map_err(|e| ApiError(format!("Failed to read response: {}", e)))
.await?;
let body = str::from_utf8(&body)
.map_err(|e| ApiError(format!("Response was not valid UTF8: {}", e)))?;
- let body = serde_json::from_str::<models::ErrorResponse>(body)?;
+ let body = serde_json::from_str::<models::ErrorResponse>(body).map_err(|e| {
+ ApiError(format!("Response body did not match the schema: {}", e))
+ })?;
Ok(GetContainerRedirectsResponse::GenericError(body))
}
code => {
let headers = response.headers().clone();
- let body = response.into_body().take(100).to_raw().await;
+ let body = response.into_body().take(100).into_raw().await;
Err(ApiError(format!(
"Unexpected response code {}:\n{:?}\n\n{}",
code,
@@ -8128,50 +8585,58 @@ where
200 => {
let body = response.into_body();
let body = body
- .to_raw()
+ .into_raw()
.map_err(|e| ApiError(format!("Failed to read response: {}", e)))
.await?;
let body = str::from_utf8(&body)
.map_err(|e| ApiError(format!("Response was not valid UTF8: {}", e)))?;
- let body = serde_json::from_str::<models::ContainerEntity>(body)?;
+ let body = serde_json::from_str::<models::ContainerEntity>(body).map_err(|e| {
+ ApiError(format!("Response body did not match the schema: {}", e))
+ })?;
Ok(GetContainerRevisionResponse::FoundEntityRevision(body))
}
400 => {
let body = response.into_body();
let body = body
- .to_raw()
+ .into_raw()
.map_err(|e| ApiError(format!("Failed to read response: {}", e)))
.await?;
let body = str::from_utf8(&body)
.map_err(|e| ApiError(format!("Response was not valid UTF8: {}", e)))?;
- let body = serde_json::from_str::<models::ErrorResponse>(body)?;
+ let body = serde_json::from_str::<models::ErrorResponse>(body).map_err(|e| {
+ ApiError(format!("Response body did not match the schema: {}", e))
+ })?;
Ok(GetContainerRevisionResponse::BadRequest(body))
}
404 => {
let body = response.into_body();
let body = body
- .to_raw()
+ .into_raw()
.map_err(|e| ApiError(format!("Failed to read response: {}", e)))
.await?;
let body = str::from_utf8(&body)
.map_err(|e| ApiError(format!("Response was not valid UTF8: {}", e)))?;
- let body = serde_json::from_str::<models::ErrorResponse>(body)?;
+ let body = serde_json::from_str::<models::ErrorResponse>(body).map_err(|e| {
+ ApiError(format!("Response body did not match the schema: {}", e))
+ })?;
Ok(GetContainerRevisionResponse::NotFound(body))
}
500 => {
let body = response.into_body();
let body = body
- .to_raw()
+ .into_raw()
.map_err(|e| ApiError(format!("Failed to read response: {}", e)))
.await?;
let body = str::from_utf8(&body)
.map_err(|e| ApiError(format!("Response was not valid UTF8: {}", e)))?;
- let body = serde_json::from_str::<models::ErrorResponse>(body)?;
+ let body = serde_json::from_str::<models::ErrorResponse>(body).map_err(|e| {
+ ApiError(format!("Response body did not match the schema: {}", e))
+ })?;
Ok(GetContainerRevisionResponse::GenericError(body))
}
code => {
let headers = response.headers().clone();
- let body = response.into_body().take(100).to_raw().await;
+ let body = response.into_body().take(100).into_raw().await;
Err(ApiError(format!(
"Unexpected response code {}:\n{:?}\n\n{}",
code,
@@ -8261,50 +8726,58 @@ where
200 => {
let body = response.into_body();
let body = body
- .to_raw()
+ .into_raw()
.map_err(|e| ApiError(format!("Failed to read response: {}", e)))
.await?;
let body = str::from_utf8(&body)
.map_err(|e| ApiError(format!("Response was not valid UTF8: {}", e)))?;
- let body = serde_json::from_str::<models::CreatorEntity>(body)?;
+ let body = serde_json::from_str::<models::CreatorEntity>(body).map_err(|e| {
+ ApiError(format!("Response body did not match the schema: {}", e))
+ })?;
Ok(GetCreatorResponse::FoundEntity(body))
}
400 => {
let body = response.into_body();
let body = body
- .to_raw()
+ .into_raw()
.map_err(|e| ApiError(format!("Failed to read response: {}", e)))
.await?;
let body = str::from_utf8(&body)
.map_err(|e| ApiError(format!("Response was not valid UTF8: {}", e)))?;
- let body = serde_json::from_str::<models::ErrorResponse>(body)?;
+ let body = serde_json::from_str::<models::ErrorResponse>(body).map_err(|e| {
+ ApiError(format!("Response body did not match the schema: {}", e))
+ })?;
Ok(GetCreatorResponse::BadRequest(body))
}
404 => {
let body = response.into_body();
let body = body
- .to_raw()
+ .into_raw()
.map_err(|e| ApiError(format!("Failed to read response: {}", e)))
.await?;
let body = str::from_utf8(&body)
.map_err(|e| ApiError(format!("Response was not valid UTF8: {}", e)))?;
- let body = serde_json::from_str::<models::ErrorResponse>(body)?;
+ let body = serde_json::from_str::<models::ErrorResponse>(body).map_err(|e| {
+ ApiError(format!("Response body did not match the schema: {}", e))
+ })?;
Ok(GetCreatorResponse::NotFound(body))
}
500 => {
let body = response.into_body();
let body = body
- .to_raw()
+ .into_raw()
.map_err(|e| ApiError(format!("Failed to read response: {}", e)))
.await?;
let body = str::from_utf8(&body)
.map_err(|e| ApiError(format!("Response was not valid UTF8: {}", e)))?;
- let body = serde_json::from_str::<models::ErrorResponse>(body)?;
+ let body = serde_json::from_str::<models::ErrorResponse>(body).map_err(|e| {
+ ApiError(format!("Response body did not match the schema: {}", e))
+ })?;
Ok(GetCreatorResponse::GenericError(body))
}
code => {
let headers = response.headers().clone();
- let body = response.into_body().take(100).to_raw().await;
+ let body = response.into_body().take(100).into_raw().await;
Err(ApiError(format!(
"Unexpected response code {}:\n{:?}\n\n{}",
code,
@@ -8386,50 +8859,58 @@ where
200 => {
let body = response.into_body();
let body = body
- .to_raw()
+ .into_raw()
.map_err(|e| ApiError(format!("Failed to read response: {}", e)))
.await?;
let body = str::from_utf8(&body)
.map_err(|e| ApiError(format!("Response was not valid UTF8: {}", e)))?;
- let body = serde_json::from_str::<models::EntityEdit>(body)?;
+ let body = serde_json::from_str::<models::EntityEdit>(body).map_err(|e| {
+ ApiError(format!("Response body did not match the schema: {}", e))
+ })?;
Ok(GetCreatorEditResponse::FoundEdit(body))
}
400 => {
let body = response.into_body();
let body = body
- .to_raw()
+ .into_raw()
.map_err(|e| ApiError(format!("Failed to read response: {}", e)))
.await?;
let body = str::from_utf8(&body)
.map_err(|e| ApiError(format!("Response was not valid UTF8: {}", e)))?;
- let body = serde_json::from_str::<models::ErrorResponse>(body)?;
+ let body = serde_json::from_str::<models::ErrorResponse>(body).map_err(|e| {
+ ApiError(format!("Response body did not match the schema: {}", e))
+ })?;
Ok(GetCreatorEditResponse::BadRequest(body))
}
404 => {
let body = response.into_body();
let body = body
- .to_raw()
+ .into_raw()
.map_err(|e| ApiError(format!("Failed to read response: {}", e)))
.await?;
let body = str::from_utf8(&body)
.map_err(|e| ApiError(format!("Response was not valid UTF8: {}", e)))?;
- let body = serde_json::from_str::<models::ErrorResponse>(body)?;
+ let body = serde_json::from_str::<models::ErrorResponse>(body).map_err(|e| {
+ ApiError(format!("Response body did not match the schema: {}", e))
+ })?;
Ok(GetCreatorEditResponse::NotFound(body))
}
500 => {
let body = response.into_body();
let body = body
- .to_raw()
+ .into_raw()
.map_err(|e| ApiError(format!("Failed to read response: {}", e)))
.await?;
let body = str::from_utf8(&body)
.map_err(|e| ApiError(format!("Response was not valid UTF8: {}", e)))?;
- let body = serde_json::from_str::<models::ErrorResponse>(body)?;
+ let body = serde_json::from_str::<models::ErrorResponse>(body).map_err(|e| {
+ ApiError(format!("Response body did not match the schema: {}", e))
+ })?;
Ok(GetCreatorEditResponse::GenericError(body))
}
code => {
let headers = response.headers().clone();
- let body = response.into_body().take(100).to_raw().await;
+ let body = response.into_body().take(100).into_raw().await;
Err(ApiError(format!(
"Unexpected response code {}:\n{:?}\n\n{}",
code,
@@ -8515,50 +8996,59 @@ where
200 => {
let body = response.into_body();
let body = body
- .to_raw()
+ .into_raw()
.map_err(|e| ApiError(format!("Failed to read response: {}", e)))
.await?;
let body = str::from_utf8(&body)
.map_err(|e| ApiError(format!("Response was not valid UTF8: {}", e)))?;
- let body = serde_json::from_str::<Vec<models::EntityHistoryEntry>>(body)?;
+ let body =
+ serde_json::from_str::<Vec<models::EntityHistoryEntry>>(body).map_err(|e| {
+ ApiError(format!("Response body did not match the schema: {}", e))
+ })?;
Ok(GetCreatorHistoryResponse::FoundEntityHistory(body))
}
400 => {
let body = response.into_body();
let body = body
- .to_raw()
+ .into_raw()
.map_err(|e| ApiError(format!("Failed to read response: {}", e)))
.await?;
let body = str::from_utf8(&body)
.map_err(|e| ApiError(format!("Response was not valid UTF8: {}", e)))?;
- let body = serde_json::from_str::<models::ErrorResponse>(body)?;
+ let body = serde_json::from_str::<models::ErrorResponse>(body).map_err(|e| {
+ ApiError(format!("Response body did not match the schema: {}", e))
+ })?;
Ok(GetCreatorHistoryResponse::BadRequest(body))
}
404 => {
let body = response.into_body();
let body = body
- .to_raw()
+ .into_raw()
.map_err(|e| ApiError(format!("Failed to read response: {}", e)))
.await?;
let body = str::from_utf8(&body)
.map_err(|e| ApiError(format!("Response was not valid UTF8: {}", e)))?;
- let body = serde_json::from_str::<models::ErrorResponse>(body)?;
+ let body = serde_json::from_str::<models::ErrorResponse>(body).map_err(|e| {
+ ApiError(format!("Response body did not match the schema: {}", e))
+ })?;
Ok(GetCreatorHistoryResponse::NotFound(body))
}
500 => {
let body = response.into_body();
let body = body
- .to_raw()
+ .into_raw()
.map_err(|e| ApiError(format!("Failed to read response: {}", e)))
.await?;
let body = str::from_utf8(&body)
.map_err(|e| ApiError(format!("Response was not valid UTF8: {}", e)))?;
- let body = serde_json::from_str::<models::ErrorResponse>(body)?;
+ let body = serde_json::from_str::<models::ErrorResponse>(body).map_err(|e| {
+ ApiError(format!("Response body did not match the schema: {}", e))
+ })?;
Ok(GetCreatorHistoryResponse::GenericError(body))
}
code => {
let headers = response.headers().clone();
- let body = response.into_body().take(100).to_raw().await;
+ let body = response.into_body().take(100).into_raw().await;
Err(ApiError(format!(
"Unexpected response code {}:\n{:?}\n\n{}",
code,
@@ -8640,50 +9130,58 @@ where
200 => {
let body = response.into_body();
let body = body
- .to_raw()
+ .into_raw()
.map_err(|e| ApiError(format!("Failed to read response: {}", e)))
.await?;
let body = str::from_utf8(&body)
.map_err(|e| ApiError(format!("Response was not valid UTF8: {}", e)))?;
- let body = serde_json::from_str::<Vec<String>>(body)?;
+ let body = serde_json::from_str::<Vec<String>>(body).map_err(|e| {
+ ApiError(format!("Response body did not match the schema: {}", e))
+ })?;
Ok(GetCreatorRedirectsResponse::FoundEntityRedirects(body))
}
400 => {
let body = response.into_body();
let body = body
- .to_raw()
+ .into_raw()
.map_err(|e| ApiError(format!("Failed to read response: {}", e)))
.await?;
let body = str::from_utf8(&body)
.map_err(|e| ApiError(format!("Response was not valid UTF8: {}", e)))?;
- let body = serde_json::from_str::<models::ErrorResponse>(body)?;
+ let body = serde_json::from_str::<models::ErrorResponse>(body).map_err(|e| {
+ ApiError(format!("Response body did not match the schema: {}", e))
+ })?;
Ok(GetCreatorRedirectsResponse::BadRequest(body))
}
404 => {
let body = response.into_body();
let body = body
- .to_raw()
+ .into_raw()
.map_err(|e| ApiError(format!("Failed to read response: {}", e)))
.await?;
let body = str::from_utf8(&body)
.map_err(|e| ApiError(format!("Response was not valid UTF8: {}", e)))?;
- let body = serde_json::from_str::<models::ErrorResponse>(body)?;
+ let body = serde_json::from_str::<models::ErrorResponse>(body).map_err(|e| {
+ ApiError(format!("Response body did not match the schema: {}", e))
+ })?;
Ok(GetCreatorRedirectsResponse::NotFound(body))
}
500 => {
let body = response.into_body();
let body = body
- .to_raw()
+ .into_raw()
.map_err(|e| ApiError(format!("Failed to read response: {}", e)))
.await?;
let body = str::from_utf8(&body)
.map_err(|e| ApiError(format!("Response was not valid UTF8: {}", e)))?;
- let body = serde_json::from_str::<models::ErrorResponse>(body)?;
+ let body = serde_json::from_str::<models::ErrorResponse>(body).map_err(|e| {
+ ApiError(format!("Response body did not match the schema: {}", e))
+ })?;
Ok(GetCreatorRedirectsResponse::GenericError(body))
}
code => {
let headers = response.headers().clone();
- let body = response.into_body().take(100).to_raw().await;
+ let body = response.into_body().take(100).into_raw().await;
Err(ApiError(format!(
"Unexpected response code {}:\n{:?}\n\n{}",
code,
@@ -8769,50 +9267,59 @@ where
200 => {
let body = response.into_body();
let body = body
- .to_raw()
+ .into_raw()
.map_err(|e| ApiError(format!("Failed to read response: {}", e)))
.await?;
let body = str::from_utf8(&body)
.map_err(|e| ApiError(format!("Response was not valid UTF8: {}", e)))?;
- let body = serde_json::from_str::<Vec<models::ReleaseEntity>>(body)?;
+ let body =
+ serde_json::from_str::<Vec<models::ReleaseEntity>>(body).map_err(|e| {
+ ApiError(format!("Response body did not match the schema: {}", e))
+ })?;
Ok(GetCreatorReleasesResponse::Found(body))
}
400 => {
let body = response.into_body();
let body = body
- .to_raw()
+ .into_raw()
.map_err(|e| ApiError(format!("Failed to read response: {}", e)))
.await?;
let body = str::from_utf8(&body)
.map_err(|e| ApiError(format!("Response was not valid UTF8: {}", e)))?;
- let body = serde_json::from_str::<models::ErrorResponse>(body)?;
+ let body = serde_json::from_str::<models::ErrorResponse>(body).map_err(|e| {
+ ApiError(format!("Response body did not match the schema: {}", e))
+ })?;
Ok(GetCreatorReleasesResponse::BadRequest(body))
}
404 => {
let body = response.into_body();
let body = body
- .to_raw()
+ .into_raw()
.map_err(|e| ApiError(format!("Failed to read response: {}", e)))
.await?;
let body = str::from_utf8(&body)
.map_err(|e| ApiError(format!("Response was not valid UTF8: {}", e)))?;
- let body = serde_json::from_str::<models::ErrorResponse>(body)?;
+ let body = serde_json::from_str::<models::ErrorResponse>(body).map_err(|e| {
+ ApiError(format!("Response body did not match the schema: {}", e))
+ })?;
Ok(GetCreatorReleasesResponse::NotFound(body))
}
500 => {
let body = response.into_body();
let body = body
- .to_raw()
+ .into_raw()
.map_err(|e| ApiError(format!("Failed to read response: {}", e)))
.await?;
let body = str::from_utf8(&body)
.map_err(|e| ApiError(format!("Response was not valid UTF8: {}", e)))?;
- let body = serde_json::from_str::<models::ErrorResponse>(body)?;
+ let body = serde_json::from_str::<models::ErrorResponse>(body).map_err(|e| {
+ ApiError(format!("Response body did not match the schema: {}", e))
+ })?;
Ok(GetCreatorReleasesResponse::GenericError(body))
}
code => {
let headers = response.headers().clone();
- let body = response.into_body().take(100).to_raw().await;
+ let body = response.into_body().take(100).into_raw().await;
Err(ApiError(format!(
"Unexpected response code {}:\n{:?}\n\n{}",
code,
@@ -8902,50 +9409,58 @@ where
200 => {
let body = response.into_body();
let body = body
- .to_raw()
+ .into_raw()
.map_err(|e| ApiError(format!("Failed to read response: {}", e)))
.await?;
let body = str::from_utf8(&body)
.map_err(|e| ApiError(format!("Response was not valid UTF8: {}", e)))?;
- let body = serde_json::from_str::<models::CreatorEntity>(body)?;
+ let body = serde_json::from_str::<models::CreatorEntity>(body).map_err(|e| {
+ ApiError(format!("Response body did not match the schema: {}", e))
+ })?;
Ok(GetCreatorRevisionResponse::FoundEntityRevision(body))
}
400 => {
let body = response.into_body();
let body = body
- .to_raw()
+ .into_raw()
.map_err(|e| ApiError(format!("Failed to read response: {}", e)))
.await?;
let body = str::from_utf8(&body)
.map_err(|e| ApiError(format!("Response was not valid UTF8: {}", e)))?;
- let body = serde_json::from_str::<models::ErrorResponse>(body)?;
+ let body = serde_json::from_str::<models::ErrorResponse>(body).map_err(|e| {
+ ApiError(format!("Response body did not match the schema: {}", e))
+ })?;
Ok(GetCreatorRevisionResponse::BadRequest(body))
}
404 => {
let body = response.into_body();
let body = body
- .to_raw()
+ .into_raw()
.map_err(|e| ApiError(format!("Failed to read response: {}", e)))
.await?;
let body = str::from_utf8(&body)
.map_err(|e| ApiError(format!("Response was not valid UTF8: {}", e)))?;
- let body = serde_json::from_str::<models::ErrorResponse>(body)?;
+ let body = serde_json::from_str::<models::ErrorResponse>(body).map_err(|e| {
+ ApiError(format!("Response body did not match the schema: {}", e))
+ })?;
Ok(GetCreatorRevisionResponse::NotFound(body))
}
500 => {
let body = response.into_body();
let body = body
- .to_raw()
+ .into_raw()
.map_err(|e| ApiError(format!("Failed to read response: {}", e)))
.await?;
let body = str::from_utf8(&body)
.map_err(|e| ApiError(format!("Response was not valid UTF8: {}", e)))?;
- let body = serde_json::from_str::<models::ErrorResponse>(body)?;
+ let body = serde_json::from_str::<models::ErrorResponse>(body).map_err(|e| {
+ ApiError(format!("Response body did not match the schema: {}", e))
+ })?;
Ok(GetCreatorRevisionResponse::GenericError(body))
}
code => {
let headers = response.headers().clone();
- let body = response.into_body().take(100).to_raw().await;
+ let body = response.into_body().take(100).into_raw().await;
Err(ApiError(format!(
"Unexpected response code {}:\n{:?}\n\n{}",
code,
@@ -9027,50 +9542,58 @@ where
200 => {
let body = response.into_body();
let body = body
- .to_raw()
+ .into_raw()
.map_err(|e| ApiError(format!("Failed to read response: {}", e)))
.await?;
let body = str::from_utf8(&body)
.map_err(|e| ApiError(format!("Response was not valid UTF8: {}", e)))?;
- let body = serde_json::from_str::<models::Editgroup>(body)?;
+ let body = serde_json::from_str::<models::Editgroup>(body).map_err(|e| {
+ ApiError(format!("Response body did not match the schema: {}", e))
+ })?;
Ok(GetEditgroupResponse::Found(body))
}
400 => {
let body = response.into_body();
let body = body
- .to_raw()
+ .into_raw()
.map_err(|e| ApiError(format!("Failed to read response: {}", e)))
.await?;
let body = str::from_utf8(&body)
.map_err(|e| ApiError(format!("Response was not valid UTF8: {}", e)))?;
- let body = serde_json::from_str::<models::ErrorResponse>(body)?;
+ let body = serde_json::from_str::<models::ErrorResponse>(body).map_err(|e| {
+ ApiError(format!("Response body did not match the schema: {}", e))
+ })?;
Ok(GetEditgroupResponse::BadRequest(body))
}
404 => {
let body = response.into_body();
let body = body
- .to_raw()
+ .into_raw()
.map_err(|e| ApiError(format!("Failed to read response: {}", e)))
.await?;
let body = str::from_utf8(&body)
.map_err(|e| ApiError(format!("Response was not valid UTF8: {}", e)))?;
- let body = serde_json::from_str::<models::ErrorResponse>(body)?;
+ let body = serde_json::from_str::<models::ErrorResponse>(body).map_err(|e| {
+ ApiError(format!("Response body did not match the schema: {}", e))
+ })?;
Ok(GetEditgroupResponse::NotFound(body))
}
500 => {
let body = response.into_body();
let body = body
- .to_raw()
+ .into_raw()
.map_err(|e| ApiError(format!("Failed to read response: {}", e)))
.await?;
let body = str::from_utf8(&body)
.map_err(|e| ApiError(format!("Response was not valid UTF8: {}", e)))?;
- let body = serde_json::from_str::<models::ErrorResponse>(body)?;
+ let body = serde_json::from_str::<models::ErrorResponse>(body).map_err(|e| {
+ ApiError(format!("Response body did not match the schema: {}", e))
+ })?;
Ok(GetEditgroupResponse::GenericError(body))
}
code => {
let headers = response.headers().clone();
- let body = response.into_body().take(100).to_raw().await;
+ let body = response.into_body().take(100).into_raw().await;
Err(ApiError(format!(
"Unexpected response code {}:\n{:?}\n\n{}",
code,
@@ -9156,23 +9679,27 @@ where
200 => {
let body = response.into_body();
let body = body
- .to_raw()
+ .into_raw()
.map_err(|e| ApiError(format!("Failed to read response: {}", e)))
.await?;
let body = str::from_utf8(&body)
.map_err(|e| ApiError(format!("Response was not valid UTF8: {}", e)))?;
- let body = serde_json::from_str::<Vec<models::EditgroupAnnotation>>(body)?;
+ let body = serde_json::from_str::<Vec<models::EditgroupAnnotation>>(body).map_err(
+ |e| ApiError(format!("Response body did not match the schema: {}", e)),
+ )?;
Ok(GetEditgroupAnnotationsResponse::Success(body))
}
400 => {
let body = response.into_body();
let body = body
- .to_raw()
+ .into_raw()
.map_err(|e| ApiError(format!("Failed to read response: {}", e)))
.await?;
let body = str::from_utf8(&body)
.map_err(|e| ApiError(format!("Response was not valid UTF8: {}", e)))?;
- let body = serde_json::from_str::<models::ErrorResponse>(body)?;
+ let body = serde_json::from_str::<models::ErrorResponse>(body).map_err(|e| {
+ ApiError(format!("Response body did not match the schema: {}", e))
+ })?;
Ok(GetEditgroupAnnotationsResponse::BadRequest(body))
}
401 => {
@@ -9200,12 +9727,14 @@ where
let body = response.into_body();
let body = body
- .to_raw()
+ .into_raw()
.map_err(|e| ApiError(format!("Failed to read response: {}", e)))
.await?;
let body = str::from_utf8(&body)
.map_err(|e| ApiError(format!("Response was not valid UTF8: {}", e)))?;
- let body = serde_json::from_str::<models::ErrorResponse>(body)?;
+ let body = serde_json::from_str::<models::ErrorResponse>(body).map_err(|e| {
+ ApiError(format!("Response body did not match the schema: {}", e))
+ })?;
Ok(GetEditgroupAnnotationsResponse::NotAuthorized {
body: body,
www_authenticate: response_www_authenticate,
@@ -9214,39 +9743,45 @@ where
403 => {
let body = response.into_body();
let body = body
- .to_raw()
+ .into_raw()
.map_err(|e| ApiError(format!("Failed to read response: {}", e)))
.await?;
let body = str::from_utf8(&body)
.map_err(|e| ApiError(format!("Response was not valid UTF8: {}", e)))?;
- let body = serde_json::from_str::<models::ErrorResponse>(body)?;
+ let body = serde_json::from_str::<models::ErrorResponse>(body).map_err(|e| {
+ ApiError(format!("Response body did not match the schema: {}", e))
+ })?;
Ok(GetEditgroupAnnotationsResponse::Forbidden(body))
}
404 => {
let body = response.into_body();
let body = body
- .to_raw()
+ .into_raw()
.map_err(|e| ApiError(format!("Failed to read response: {}", e)))
.await?;
let body = str::from_utf8(&body)
.map_err(|e| ApiError(format!("Response was not valid UTF8: {}", e)))?;
- let body = serde_json::from_str::<models::ErrorResponse>(body)?;
+ let body = serde_json::from_str::<models::ErrorResponse>(body).map_err(|e| {
+ ApiError(format!("Response body did not match the schema: {}", e))
+ })?;
Ok(GetEditgroupAnnotationsResponse::NotFound(body))
}
500 => {
let body = response.into_body();
let body = body
- .to_raw()
+ .into_raw()
.map_err(|e| ApiError(format!("Failed to read response: {}", e)))
.await?;
let body = str::from_utf8(&body)
.map_err(|e| ApiError(format!("Response was not valid UTF8: {}", e)))?;
- let body = serde_json::from_str::<models::ErrorResponse>(body)?;
+ let body = serde_json::from_str::<models::ErrorResponse>(body).map_err(|e| {
+ ApiError(format!("Response body did not match the schema: {}", e))
+ })?;
Ok(GetEditgroupAnnotationsResponse::GenericError(body))
}
code => {
let headers = response.headers().clone();
- let body = response.into_body().take(100).to_raw().await;
+ let body = response.into_body().take(100).into_raw().await;
Err(ApiError(format!(
"Unexpected response code {}:\n{:?}\n\n{}",
code,
@@ -9339,50 +9874,58 @@ where
200 => {
let body = response.into_body();
let body = body
- .to_raw()
+ .into_raw()
.map_err(|e| ApiError(format!("Failed to read response: {}", e)))
.await?;
let body = str::from_utf8(&body)
.map_err(|e| ApiError(format!("Response was not valid UTF8: {}", e)))?;
- let body = serde_json::from_str::<Vec<models::Editgroup>>(body)?;
+ let body = serde_json::from_str::<Vec<models::Editgroup>>(body).map_err(|e| {
+ ApiError(format!("Response body did not match the schema: {}", e))
+ })?;
Ok(GetEditgroupsReviewableResponse::Found(body))
}
400 => {
let body = response.into_body();
let body = body
- .to_raw()
+ .into_raw()
.map_err(|e| ApiError(format!("Failed to read response: {}", e)))
.await?;
let body = str::from_utf8(&body)
.map_err(|e| ApiError(format!("Response was not valid UTF8: {}", e)))?;
- let body = serde_json::from_str::<models::ErrorResponse>(body)?;
+ let body = serde_json::from_str::<models::ErrorResponse>(body).map_err(|e| {
+ ApiError(format!("Response body did not match the schema: {}", e))
+ })?;
Ok(GetEditgroupsReviewableResponse::BadRequest(body))
}
404 => {
let body = response.into_body();
let body = body
- .to_raw()
+ .into_raw()
.map_err(|e| ApiError(format!("Failed to read response: {}", e)))
.await?;
let body = str::from_utf8(&body)
.map_err(|e| ApiError(format!("Response was not valid UTF8: {}", e)))?;
- let body = serde_json::from_str::<models::ErrorResponse>(body)?;
+ let body = serde_json::from_str::<models::ErrorResponse>(body).map_err(|e| {
+ ApiError(format!("Response body did not match the schema: {}", e))
+ })?;
Ok(GetEditgroupsReviewableResponse::NotFound(body))
}
500 => {
let body = response.into_body();
let body = body
- .to_raw()
+ .into_raw()
.map_err(|e| ApiError(format!("Failed to read response: {}", e)))
.await?;
let body = str::from_utf8(&body)
.map_err(|e| ApiError(format!("Response was not valid UTF8: {}", e)))?;
- let body = serde_json::from_str::<models::ErrorResponse>(body)?;
+ let body = serde_json::from_str::<models::ErrorResponse>(body).map_err(|e| {
+ ApiError(format!("Response body did not match the schema: {}", e))
+ })?;
Ok(GetEditgroupsReviewableResponse::GenericError(body))
}
code => {
let headers = response.headers().clone();
- let body = response.into_body().take(100).to_raw().await;
+ let body = response.into_body().take(100).into_raw().await;
Err(ApiError(format!(
"Unexpected response code {}:\n{:?}\n\n{}",
code,
@@ -9464,50 +10007,58 @@ where
200 => {
let body = response.into_body();
let body = body
- .to_raw()
+ .into_raw()
.map_err(|e| ApiError(format!("Failed to read response: {}", e)))
.await?;
let body = str::from_utf8(&body)
.map_err(|e| ApiError(format!("Response was not valid UTF8: {}", e)))?;
- let body = serde_json::from_str::<models::Editor>(body)?;
+ let body = serde_json::from_str::<models::Editor>(body).map_err(|e| {
+ ApiError(format!("Response body did not match the schema: {}", e))
+ })?;
Ok(GetEditorResponse::Found(body))
}
400 => {
let body = response.into_body();
let body = body
- .to_raw()
+ .into_raw()
.map_err(|e| ApiError(format!("Failed to read response: {}", e)))
.await?;
let body = str::from_utf8(&body)
.map_err(|e| ApiError(format!("Response was not valid UTF8: {}", e)))?;
- let body = serde_json::from_str::<models::ErrorResponse>(body)?;
+ let body = serde_json::from_str::<models::ErrorResponse>(body).map_err(|e| {
+ ApiError(format!("Response body did not match the schema: {}", e))
+ })?;
Ok(GetEditorResponse::BadRequest(body))
}
404 => {
let body = response.into_body();
let body = body
- .to_raw()
+ .into_raw()
.map_err(|e| ApiError(format!("Failed to read response: {}", e)))
.await?;
let body = str::from_utf8(&body)
.map_err(|e| ApiError(format!("Response was not valid UTF8: {}", e)))?;
- let body = serde_json::from_str::<models::ErrorResponse>(body)?;
+ let body = serde_json::from_str::<models::ErrorResponse>(body).map_err(|e| {
+ ApiError(format!("Response body did not match the schema: {}", e))
+ })?;
Ok(GetEditorResponse::NotFound(body))
}
500 => {
let body = response.into_body();
let body = body
- .to_raw()
+ .into_raw()
.map_err(|e| ApiError(format!("Failed to read response: {}", e)))
.await?;
let body = str::from_utf8(&body)
.map_err(|e| ApiError(format!("Response was not valid UTF8: {}", e)))?;
- let body = serde_json::from_str::<models::ErrorResponse>(body)?;
+ let body = serde_json::from_str::<models::ErrorResponse>(body).map_err(|e| {
+ ApiError(format!("Response body did not match the schema: {}", e))
+ })?;
Ok(GetEditorResponse::GenericError(body))
}
code => {
let headers = response.headers().clone();
- let body = response.into_body().take(100).to_raw().await;
+ let body = response.into_body().take(100).into_raw().await;
Err(ApiError(format!(
"Unexpected response code {}:\n{:?}\n\n{}",
code,
@@ -9601,23 +10152,27 @@ where
200 => {
let body = response.into_body();
let body = body
- .to_raw()
+ .into_raw()
.map_err(|e| ApiError(format!("Failed to read response: {}", e)))
.await?;
let body = str::from_utf8(&body)
.map_err(|e| ApiError(format!("Response was not valid UTF8: {}", e)))?;
- let body = serde_json::from_str::<Vec<models::EditgroupAnnotation>>(body)?;
+ let body = serde_json::from_str::<Vec<models::EditgroupAnnotation>>(body).map_err(
+ |e| ApiError(format!("Response body did not match the schema: {}", e)),
+ )?;
Ok(GetEditorAnnotationsResponse::Success(body))
}
400 => {
let body = response.into_body();
let body = body
- .to_raw()
+ .into_raw()
.map_err(|e| ApiError(format!("Failed to read response: {}", e)))
.await?;
let body = str::from_utf8(&body)
.map_err(|e| ApiError(format!("Response was not valid UTF8: {}", e)))?;
- let body = serde_json::from_str::<models::ErrorResponse>(body)?;
+ let body = serde_json::from_str::<models::ErrorResponse>(body).map_err(|e| {
+ ApiError(format!("Response body did not match the schema: {}", e))
+ })?;
Ok(GetEditorAnnotationsResponse::BadRequest(body))
}
401 => {
@@ -9645,12 +10200,14 @@ where
let body = response.into_body();
let body = body
- .to_raw()
+ .into_raw()
.map_err(|e| ApiError(format!("Failed to read response: {}", e)))
.await?;
let body = str::from_utf8(&body)
.map_err(|e| ApiError(format!("Response was not valid UTF8: {}", e)))?;
- let body = serde_json::from_str::<models::ErrorResponse>(body)?;
+ let body = serde_json::from_str::<models::ErrorResponse>(body).map_err(|e| {
+ ApiError(format!("Response body did not match the schema: {}", e))
+ })?;
Ok(GetEditorAnnotationsResponse::NotAuthorized {
body: body,
www_authenticate: response_www_authenticate,
@@ -9659,39 +10216,45 @@ where
403 => {
let body = response.into_body();
let body = body
- .to_raw()
+ .into_raw()
.map_err(|e| ApiError(format!("Failed to read response: {}", e)))
.await?;
let body = str::from_utf8(&body)
.map_err(|e| ApiError(format!("Response was not valid UTF8: {}", e)))?;
- let body = serde_json::from_str::<models::ErrorResponse>(body)?;
+ let body = serde_json::from_str::<models::ErrorResponse>(body).map_err(|e| {
+ ApiError(format!("Response body did not match the schema: {}", e))
+ })?;
Ok(GetEditorAnnotationsResponse::Forbidden(body))
}
404 => {
let body = response.into_body();
let body = body
- .to_raw()
+ .into_raw()
.map_err(|e| ApiError(format!("Failed to read response: {}", e)))
.await?;
let body = str::from_utf8(&body)
.map_err(|e| ApiError(format!("Response was not valid UTF8: {}", e)))?;
- let body = serde_json::from_str::<models::ErrorResponse>(body)?;
+ let body = serde_json::from_str::<models::ErrorResponse>(body).map_err(|e| {
+ ApiError(format!("Response body did not match the schema: {}", e))
+ })?;
Ok(GetEditorAnnotationsResponse::NotFound(body))
}
500 => {
let body = response.into_body();
let body = body
- .to_raw()
+ .into_raw()
.map_err(|e| ApiError(format!("Failed to read response: {}", e)))
.await?;
let body = str::from_utf8(&body)
.map_err(|e| ApiError(format!("Response was not valid UTF8: {}", e)))?;
- let body = serde_json::from_str::<models::ErrorResponse>(body)?;
+ let body = serde_json::from_str::<models::ErrorResponse>(body).map_err(|e| {
+ ApiError(format!("Response body did not match the schema: {}", e))
+ })?;
Ok(GetEditorAnnotationsResponse::GenericError(body))
}
code => {
let headers = response.headers().clone();
- let body = response.into_body().take(100).to_raw().await;
+ let body = response.into_body().take(100).into_raw().await;
Err(ApiError(format!(
"Unexpected response code {}:\n{:?}\n\n{}",
code,
@@ -9785,50 +10348,58 @@ where
200 => {
let body = response.into_body();
let body = body
- .to_raw()
+ .into_raw()
.map_err(|e| ApiError(format!("Failed to read response: {}", e)))
.await?;
let body = str::from_utf8(&body)
.map_err(|e| ApiError(format!("Response was not valid UTF8: {}", e)))?;
- let body = serde_json::from_str::<Vec<models::Editgroup>>(body)?;
+ let body = serde_json::from_str::<Vec<models::Editgroup>>(body).map_err(|e| {
+ ApiError(format!("Response body did not match the schema: {}", e))
+ })?;
Ok(GetEditorEditgroupsResponse::Found(body))
}
400 => {
let body = response.into_body();
let body = body
- .to_raw()
+ .into_raw()
.map_err(|e| ApiError(format!("Failed to read response: {}", e)))
.await?;
let body = str::from_utf8(&body)
.map_err(|e| ApiError(format!("Response was not valid UTF8: {}", e)))?;
- let body = serde_json::from_str::<models::ErrorResponse>(body)?;
+ let body = serde_json::from_str::<models::ErrorResponse>(body).map_err(|e| {
+ ApiError(format!("Response body did not match the schema: {}", e))
+ })?;
Ok(GetEditorEditgroupsResponse::BadRequest(body))
}
404 => {
let body = response.into_body();
let body = body
- .to_raw()
+ .into_raw()
.map_err(|e| ApiError(format!("Failed to read response: {}", e)))
.await?;
let body = str::from_utf8(&body)
.map_err(|e| ApiError(format!("Response was not valid UTF8: {}", e)))?;
- let body = serde_json::from_str::<models::ErrorResponse>(body)?;
+ let body = serde_json::from_str::<models::ErrorResponse>(body).map_err(|e| {
+ ApiError(format!("Response body did not match the schema: {}", e))
+ })?;
Ok(GetEditorEditgroupsResponse::NotFound(body))
}
500 => {
let body = response.into_body();
let body = body
- .to_raw()
+ .into_raw()
.map_err(|e| ApiError(format!("Failed to read response: {}", e)))
.await?;
let body = str::from_utf8(&body)
.map_err(|e| ApiError(format!("Response was not valid UTF8: {}", e)))?;
- let body = serde_json::from_str::<models::ErrorResponse>(body)?;
+ let body = serde_json::from_str::<models::ErrorResponse>(body).map_err(|e| {
+ ApiError(format!("Response body did not match the schema: {}", e))
+ })?;
Ok(GetEditorEditgroupsResponse::GenericError(body))
}
code => {
let headers = response.headers().clone();
- let body = response.into_body().take(100).to_raw().await;
+ let body = response.into_body().take(100).into_raw().await;
Err(ApiError(format!(
"Unexpected response code {}:\n{:?}\n\n{}",
code,
@@ -9918,50 +10489,58 @@ where
200 => {
let body = response.into_body();
let body = body
- .to_raw()
+ .into_raw()
.map_err(|e| ApiError(format!("Failed to read response: {}", e)))
.await?;
let body = str::from_utf8(&body)
.map_err(|e| ApiError(format!("Response was not valid UTF8: {}", e)))?;
- let body = serde_json::from_str::<models::FileEntity>(body)?;
+ let body = serde_json::from_str::<models::FileEntity>(body).map_err(|e| {
+ ApiError(format!("Response body did not match the schema: {}", e))
+ })?;
Ok(GetFileResponse::FoundEntity(body))
}
400 => {
let body = response.into_body();
let body = body
- .to_raw()
+ .into_raw()
.map_err(|e| ApiError(format!("Failed to read response: {}", e)))
.await?;
let body = str::from_utf8(&body)
.map_err(|e| ApiError(format!("Response was not valid UTF8: {}", e)))?;
- let body = serde_json::from_str::<models::ErrorResponse>(body)?;
+ let body = serde_json::from_str::<models::ErrorResponse>(body).map_err(|e| {
+ ApiError(format!("Response body did not match the schema: {}", e))
+ })?;
Ok(GetFileResponse::BadRequest(body))
}
404 => {
let body = response.into_body();
let body = body
- .to_raw()
+ .into_raw()
.map_err(|e| ApiError(format!("Failed to read response: {}", e)))
.await?;
let body = str::from_utf8(&body)
.map_err(|e| ApiError(format!("Response was not valid UTF8: {}", e)))?;
- let body = serde_json::from_str::<models::ErrorResponse>(body)?;
+ let body = serde_json::from_str::<models::ErrorResponse>(body).map_err(|e| {
+ ApiError(format!("Response body did not match the schema: {}", e))
+ })?;
Ok(GetFileResponse::NotFound(body))
}
500 => {
let body = response.into_body();
let body = body
- .to_raw()
+ .into_raw()
.map_err(|e| ApiError(format!("Failed to read response: {}", e)))
.await?;
let body = str::from_utf8(&body)
.map_err(|e| ApiError(format!("Response was not valid UTF8: {}", e)))?;
- let body = serde_json::from_str::<models::ErrorResponse>(body)?;
+ let body = serde_json::from_str::<models::ErrorResponse>(body).map_err(|e| {
+ ApiError(format!("Response body did not match the schema: {}", e))
+ })?;
Ok(GetFileResponse::GenericError(body))
}
code => {
let headers = response.headers().clone();
- let body = response.into_body().take(100).to_raw().await;
+ let body = response.into_body().take(100).into_raw().await;
Err(ApiError(format!(
"Unexpected response code {}:\n{:?}\n\n{}",
code,
@@ -10043,50 +10622,58 @@ where
200 => {
let body = response.into_body();
let body = body
- .to_raw()
+ .into_raw()
.map_err(|e| ApiError(format!("Failed to read response: {}", e)))
.await?;
let body = str::from_utf8(&body)
.map_err(|e| ApiError(format!("Response was not valid UTF8: {}", e)))?;
- let body = serde_json::from_str::<models::EntityEdit>(body)?;
+ let body = serde_json::from_str::<models::EntityEdit>(body).map_err(|e| {
+ ApiError(format!("Response body did not match the schema: {}", e))
+ })?;
Ok(GetFileEditResponse::FoundEdit(body))
}
400 => {
let body = response.into_body();
let body = body
- .to_raw()
+ .into_raw()
.map_err(|e| ApiError(format!("Failed to read response: {}", e)))
.await?;
let body = str::from_utf8(&body)
.map_err(|e| ApiError(format!("Response was not valid UTF8: {}", e)))?;
- let body = serde_json::from_str::<models::ErrorResponse>(body)?;
+ let body = serde_json::from_str::<models::ErrorResponse>(body).map_err(|e| {
+ ApiError(format!("Response body did not match the schema: {}", e))
+ })?;
Ok(GetFileEditResponse::BadRequest(body))
}
404 => {
let body = response.into_body();
let body = body
- .to_raw()
+ .into_raw()
.map_err(|e| ApiError(format!("Failed to read response: {}", e)))
.await?;
let body = str::from_utf8(&body)
.map_err(|e| ApiError(format!("Response was not valid UTF8: {}", e)))?;
- let body = serde_json::from_str::<models::ErrorResponse>(body)?;
+ let body = serde_json::from_str::<models::ErrorResponse>(body).map_err(|e| {
+ ApiError(format!("Response body did not match the schema: {}", e))
+ })?;
Ok(GetFileEditResponse::NotFound(body))
}
500 => {
let body = response.into_body();
let body = body
- .to_raw()
+ .into_raw()
.map_err(|e| ApiError(format!("Failed to read response: {}", e)))
.await?;
let body = str::from_utf8(&body)
.map_err(|e| ApiError(format!("Response was not valid UTF8: {}", e)))?;
- let body = serde_json::from_str::<models::ErrorResponse>(body)?;
+ let body = serde_json::from_str::<models::ErrorResponse>(body).map_err(|e| {
+ ApiError(format!("Response body did not match the schema: {}", e))
+ })?;
Ok(GetFileEditResponse::GenericError(body))
}
code => {
let headers = response.headers().clone();
- let body = response.into_body().take(100).to_raw().await;
+ let body = response.into_body().take(100).into_raw().await;
Err(ApiError(format!(
"Unexpected response code {}:\n{:?}\n\n{}",
code,
@@ -10172,50 +10759,59 @@ where
200 => {
let body = response.into_body();
let body = body
- .to_raw()
+ .into_raw()
.map_err(|e| ApiError(format!("Failed to read response: {}", e)))
.await?;
let body = str::from_utf8(&body)
.map_err(|e| ApiError(format!("Response was not valid UTF8: {}", e)))?;
- let body = serde_json::from_str::<Vec<models::EntityHistoryEntry>>(body)?;
+ let body =
+ serde_json::from_str::<Vec<models::EntityHistoryEntry>>(body).map_err(|e| {
+ ApiError(format!("Response body did not match the schema: {}", e))
+ })?;
Ok(GetFileHistoryResponse::FoundEntityHistory(body))
}
400 => {
let body = response.into_body();
let body = body
- .to_raw()
+ .into_raw()
.map_err(|e| ApiError(format!("Failed to read response: {}", e)))
.await?;
let body = str::from_utf8(&body)
.map_err(|e| ApiError(format!("Response was not valid UTF8: {}", e)))?;
- let body = serde_json::from_str::<models::ErrorResponse>(body)?;
+ let body = serde_json::from_str::<models::ErrorResponse>(body).map_err(|e| {
+ ApiError(format!("Response body did not match the schema: {}", e))
+ })?;
Ok(GetFileHistoryResponse::BadRequest(body))
}
404 => {
let body = response.into_body();
let body = body
- .to_raw()
+ .into_raw()
.map_err(|e| ApiError(format!("Failed to read response: {}", e)))
.await?;
let body = str::from_utf8(&body)
.map_err(|e| ApiError(format!("Response was not valid UTF8: {}", e)))?;
- let body = serde_json::from_str::<models::ErrorResponse>(body)?;
+ let body = serde_json::from_str::<models::ErrorResponse>(body).map_err(|e| {
+ ApiError(format!("Response body did not match the schema: {}", e))
+ })?;
Ok(GetFileHistoryResponse::NotFound(body))
}
500 => {
let body = response.into_body();
let body = body
- .to_raw()
+ .into_raw()
.map_err(|e| ApiError(format!("Failed to read response: {}", e)))
.await?;
let body = str::from_utf8(&body)
.map_err(|e| ApiError(format!("Response was not valid UTF8: {}", e)))?;
- let body = serde_json::from_str::<models::ErrorResponse>(body)?;
+ let body = serde_json::from_str::<models::ErrorResponse>(body).map_err(|e| {
+ ApiError(format!("Response body did not match the schema: {}", e))
+ })?;
Ok(GetFileHistoryResponse::GenericError(body))
}
code => {
let headers = response.headers().clone();
- let body = response.into_body().take(100).to_raw().await;
+ let body = response.into_body().take(100).into_raw().await;
Err(ApiError(format!(
"Unexpected response code {}:\n{:?}\n\n{}",
code,
@@ -10297,50 +10893,58 @@ where
200 => {
let body = response.into_body();
let body = body
- .to_raw()
+ .into_raw()
.map_err(|e| ApiError(format!("Failed to read response: {}", e)))
.await?;
let body = str::from_utf8(&body)
.map_err(|e| ApiError(format!("Response was not valid UTF8: {}", e)))?;
- let body = serde_json::from_str::<Vec<String>>(body)?;
+ let body = serde_json::from_str::<Vec<String>>(body).map_err(|e| {
+ ApiError(format!("Response body did not match the schema: {}", e))
+ })?;
Ok(GetFileRedirectsResponse::FoundEntityRedirects(body))
}
400 => {
let body = response.into_body();
let body = body
- .to_raw()
+ .into_raw()
.map_err(|e| ApiError(format!("Failed to read response: {}", e)))
.await?;
let body = str::from_utf8(&body)
.map_err(|e| ApiError(format!("Response was not valid UTF8: {}", e)))?;
- let body = serde_json::from_str::<models::ErrorResponse>(body)?;
+ let body = serde_json::from_str::<models::ErrorResponse>(body).map_err(|e| {
+ ApiError(format!("Response body did not match the schema: {}", e))
+ })?;
Ok(GetFileRedirectsResponse::BadRequest(body))
}
404 => {
let body = response.into_body();
let body = body
- .to_raw()
+ .into_raw()
.map_err(|e| ApiError(format!("Failed to read response: {}", e)))
.await?;
let body = str::from_utf8(&body)
.map_err(|e| ApiError(format!("Response was not valid UTF8: {}", e)))?;
- let body = serde_json::from_str::<models::ErrorResponse>(body)?;
+ let body = serde_json::from_str::<models::ErrorResponse>(body).map_err(|e| {
+ ApiError(format!("Response body did not match the schema: {}", e))
+ })?;
Ok(GetFileRedirectsResponse::NotFound(body))
}
500 => {
let body = response.into_body();
let body = body
- .to_raw()
+ .into_raw()
.map_err(|e| ApiError(format!("Failed to read response: {}", e)))
.await?;
let body = str::from_utf8(&body)
.map_err(|e| ApiError(format!("Response was not valid UTF8: {}", e)))?;
- let body = serde_json::from_str::<models::ErrorResponse>(body)?;
+ let body = serde_json::from_str::<models::ErrorResponse>(body).map_err(|e| {
+ ApiError(format!("Response body did not match the schema: {}", e))
+ })?;
Ok(GetFileRedirectsResponse::GenericError(body))
}
code => {
let headers = response.headers().clone();
- let body = response.into_body().take(100).to_raw().await;
+ let body = response.into_body().take(100).into_raw().await;
Err(ApiError(format!(
"Unexpected response code {}:\n{:?}\n\n{}",
code,
@@ -10430,50 +11034,58 @@ where
200 => {
let body = response.into_body();
let body = body
- .to_raw()
+ .into_raw()
.map_err(|e| ApiError(format!("Failed to read response: {}", e)))
.await?;
let body = str::from_utf8(&body)
.map_err(|e| ApiError(format!("Response was not valid UTF8: {}", e)))?;
- let body = serde_json::from_str::<models::FileEntity>(body)?;
+ let body = serde_json::from_str::<models::FileEntity>(body).map_err(|e| {
+ ApiError(format!("Response body did not match the schema: {}", e))
+ })?;
Ok(GetFileRevisionResponse::FoundEntityRevision(body))
}
400 => {
let body = response.into_body();
let body = body
- .to_raw()
+ .into_raw()
.map_err(|e| ApiError(format!("Failed to read response: {}", e)))
.await?;
let body = str::from_utf8(&body)
.map_err(|e| ApiError(format!("Response was not valid UTF8: {}", e)))?;
- let body = serde_json::from_str::<models::ErrorResponse>(body)?;
+ let body = serde_json::from_str::<models::ErrorResponse>(body).map_err(|e| {
+ ApiError(format!("Response body did not match the schema: {}", e))
+ })?;
Ok(GetFileRevisionResponse::BadRequest(body))
}
404 => {
let body = response.into_body();
let body = body
- .to_raw()
+ .into_raw()
.map_err(|e| ApiError(format!("Failed to read response: {}", e)))
.await?;
let body = str::from_utf8(&body)
.map_err(|e| ApiError(format!("Response was not valid UTF8: {}", e)))?;
- let body = serde_json::from_str::<models::ErrorResponse>(body)?;
+ let body = serde_json::from_str::<models::ErrorResponse>(body).map_err(|e| {
+ ApiError(format!("Response body did not match the schema: {}", e))
+ })?;
Ok(GetFileRevisionResponse::NotFound(body))
}
500 => {
let body = response.into_body();
let body = body
- .to_raw()
+ .into_raw()
.map_err(|e| ApiError(format!("Failed to read response: {}", e)))
.await?;
let body = str::from_utf8(&body)
.map_err(|e| ApiError(format!("Response was not valid UTF8: {}", e)))?;
- let body = serde_json::from_str::<models::ErrorResponse>(body)?;
+ let body = serde_json::from_str::<models::ErrorResponse>(body).map_err(|e| {
+ ApiError(format!("Response body did not match the schema: {}", e))
+ })?;
Ok(GetFileRevisionResponse::GenericError(body))
}
code => {
let headers = response.headers().clone();
- let body = response.into_body().take(100).to_raw().await;
+ let body = response.into_body().take(100).into_raw().await;
Err(ApiError(format!(
"Unexpected response code {}:\n{:?}\n\n{}",
code,
@@ -10563,50 +11175,58 @@ where
200 => {
let body = response.into_body();
let body = body
- .to_raw()
+ .into_raw()
.map_err(|e| ApiError(format!("Failed to read response: {}", e)))
.await?;
let body = str::from_utf8(&body)
.map_err(|e| ApiError(format!("Response was not valid UTF8: {}", e)))?;
- let body = serde_json::from_str::<models::FilesetEntity>(body)?;
+ let body = serde_json::from_str::<models::FilesetEntity>(body).map_err(|e| {
+ ApiError(format!("Response body did not match the schema: {}", e))
+ })?;
Ok(GetFilesetResponse::FoundEntity(body))
}
400 => {
let body = response.into_body();
let body = body
- .to_raw()
+ .into_raw()
.map_err(|e| ApiError(format!("Failed to read response: {}", e)))
.await?;
let body = str::from_utf8(&body)
.map_err(|e| ApiError(format!("Response was not valid UTF8: {}", e)))?;
- let body = serde_json::from_str::<models::ErrorResponse>(body)?;
+ let body = serde_json::from_str::<models::ErrorResponse>(body).map_err(|e| {
+ ApiError(format!("Response body did not match the schema: {}", e))
+ })?;
Ok(GetFilesetResponse::BadRequest(body))
}
404 => {
let body = response.into_body();
let body = body
- .to_raw()
+ .into_raw()
.map_err(|e| ApiError(format!("Failed to read response: {}", e)))
.await?;
let body = str::from_utf8(&body)
.map_err(|e| ApiError(format!("Response was not valid UTF8: {}", e)))?;
- let body = serde_json::from_str::<models::ErrorResponse>(body)?;
+ let body = serde_json::from_str::<models::ErrorResponse>(body).map_err(|e| {
+ ApiError(format!("Response body did not match the schema: {}", e))
+ })?;
Ok(GetFilesetResponse::NotFound(body))
}
500 => {
let body = response.into_body();
let body = body
- .to_raw()
+ .into_raw()
.map_err(|e| ApiError(format!("Failed to read response: {}", e)))
.await?;
let body = str::from_utf8(&body)
.map_err(|e| ApiError(format!("Response was not valid UTF8: {}", e)))?;
- let body = serde_json::from_str::<models::ErrorResponse>(body)?;
+ let body = serde_json::from_str::<models::ErrorResponse>(body).map_err(|e| {
+ ApiError(format!("Response body did not match the schema: {}", e))
+ })?;
Ok(GetFilesetResponse::GenericError(body))
}
code => {
let headers = response.headers().clone();
- let body = response.into_body().take(100).to_raw().await;
+ let body = response.into_body().take(100).into_raw().await;
Err(ApiError(format!(
"Unexpected response code {}:\n{:?}\n\n{}",
code,
@@ -10688,50 +11308,58 @@ where
200 => {
let body = response.into_body();
let body = body
- .to_raw()
+ .into_raw()
.map_err(|e| ApiError(format!("Failed to read response: {}", e)))
.await?;
let body = str::from_utf8(&body)
.map_err(|e| ApiError(format!("Response was not valid UTF8: {}", e)))?;
- let body = serde_json::from_str::<models::EntityEdit>(body)?;
+ let body = serde_json::from_str::<models::EntityEdit>(body).map_err(|e| {
+ ApiError(format!("Response body did not match the schema: {}", e))
+ })?;
Ok(GetFilesetEditResponse::FoundEdit(body))
}
400 => {
let body = response.into_body();
let body = body
- .to_raw()
+ .into_raw()
.map_err(|e| ApiError(format!("Failed to read response: {}", e)))
.await?;
let body = str::from_utf8(&body)
.map_err(|e| ApiError(format!("Response was not valid UTF8: {}", e)))?;
- let body = serde_json::from_str::<models::ErrorResponse>(body)?;
+ let body = serde_json::from_str::<models::ErrorResponse>(body).map_err(|e| {
+ ApiError(format!("Response body did not match the schema: {}", e))
+ })?;
Ok(GetFilesetEditResponse::BadRequest(body))
}
404 => {
let body = response.into_body();
let body = body
- .to_raw()
+ .into_raw()
.map_err(|e| ApiError(format!("Failed to read response: {}", e)))
.await?;
let body = str::from_utf8(&body)
.map_err(|e| ApiError(format!("Response was not valid UTF8: {}", e)))?;
- let body = serde_json::from_str::<models::ErrorResponse>(body)?;
+ let body = serde_json::from_str::<models::ErrorResponse>(body).map_err(|e| {
+ ApiError(format!("Response body did not match the schema: {}", e))
+ })?;
Ok(GetFilesetEditResponse::NotFound(body))
}
500 => {
let body = response.into_body();
let body = body
- .to_raw()
+ .into_raw()
.map_err(|e| ApiError(format!("Failed to read response: {}", e)))
.await?;
let body = str::from_utf8(&body)
.map_err(|e| ApiError(format!("Response was not valid UTF8: {}", e)))?;
- let body = serde_json::from_str::<models::ErrorResponse>(body)?;
+ let body = serde_json::from_str::<models::ErrorResponse>(body).map_err(|e| {
+ ApiError(format!("Response body did not match the schema: {}", e))
+ })?;
Ok(GetFilesetEditResponse::GenericError(body))
}
code => {
let headers = response.headers().clone();
- let body = response.into_body().take(100).to_raw().await;
+ let body = response.into_body().take(100).into_raw().await;
Err(ApiError(format!(
"Unexpected response code {}:\n{:?}\n\n{}",
code,
@@ -10817,50 +11445,59 @@ where
200 => {
let body = response.into_body();
let body = body
- .to_raw()
+ .into_raw()
.map_err(|e| ApiError(format!("Failed to read response: {}", e)))
.await?;
let body = str::from_utf8(&body)
.map_err(|e| ApiError(format!("Response was not valid UTF8: {}", e)))?;
- let body = serde_json::from_str::<Vec<models::EntityHistoryEntry>>(body)?;
+ let body =
+ serde_json::from_str::<Vec<models::EntityHistoryEntry>>(body).map_err(|e| {
+ ApiError(format!("Response body did not match the schema: {}", e))
+ })?;
Ok(GetFilesetHistoryResponse::FoundEntityHistory(body))
}
400 => {
let body = response.into_body();
let body = body
- .to_raw()
+ .into_raw()
.map_err(|e| ApiError(format!("Failed to read response: {}", e)))
.await?;
let body = str::from_utf8(&body)
.map_err(|e| ApiError(format!("Response was not valid UTF8: {}", e)))?;
- let body = serde_json::from_str::<models::ErrorResponse>(body)?;
+ let body = serde_json::from_str::<models::ErrorResponse>(body).map_err(|e| {
+ ApiError(format!("Response body did not match the schema: {}", e))
+ })?;
Ok(GetFilesetHistoryResponse::BadRequest(body))
}
404 => {
let body = response.into_body();
let body = body
- .to_raw()
+ .into_raw()
.map_err(|e| ApiError(format!("Failed to read response: {}", e)))
.await?;
let body = str::from_utf8(&body)
.map_err(|e| ApiError(format!("Response was not valid UTF8: {}", e)))?;
- let body = serde_json::from_str::<models::ErrorResponse>(body)?;
+ let body = serde_json::from_str::<models::ErrorResponse>(body).map_err(|e| {
+ ApiError(format!("Response body did not match the schema: {}", e))
+ })?;
Ok(GetFilesetHistoryResponse::NotFound(body))
}
500 => {
let body = response.into_body();
let body = body
- .to_raw()
+ .into_raw()
.map_err(|e| ApiError(format!("Failed to read response: {}", e)))
.await?;
let body = str::from_utf8(&body)
.map_err(|e| ApiError(format!("Response was not valid UTF8: {}", e)))?;
- let body = serde_json::from_str::<models::ErrorResponse>(body)?;
+ let body = serde_json::from_str::<models::ErrorResponse>(body).map_err(|e| {
+ ApiError(format!("Response body did not match the schema: {}", e))
+ })?;
Ok(GetFilesetHistoryResponse::GenericError(body))
}
code => {
let headers = response.headers().clone();
- let body = response.into_body().take(100).to_raw().await;
+ let body = response.into_body().take(100).into_raw().await;
Err(ApiError(format!(
"Unexpected response code {}:\n{:?}\n\n{}",
code,
@@ -10942,50 +11579,58 @@ where
200 => {
let body = response.into_body();
let body = body
- .to_raw()
+ .into_raw()
.map_err(|e| ApiError(format!("Failed to read response: {}", e)))
.await?;
let body = str::from_utf8(&body)
.map_err(|e| ApiError(format!("Response was not valid UTF8: {}", e)))?;
- let body = serde_json::from_str::<Vec<String>>(body)?;
+ let body = serde_json::from_str::<Vec<String>>(body).map_err(|e| {
+ ApiError(format!("Response body did not match the schema: {}", e))
+ })?;
Ok(GetFilesetRedirectsResponse::FoundEntityRedirects(body))
}
400 => {
let body = response.into_body();
let body = body
- .to_raw()
+ .into_raw()
.map_err(|e| ApiError(format!("Failed to read response: {}", e)))
.await?;
let body = str::from_utf8(&body)
.map_err(|e| ApiError(format!("Response was not valid UTF8: {}", e)))?;
- let body = serde_json::from_str::<models::ErrorResponse>(body)?;
+ let body = serde_json::from_str::<models::ErrorResponse>(body).map_err(|e| {
+ ApiError(format!("Response body did not match the schema: {}", e))
+ })?;
Ok(GetFilesetRedirectsResponse::BadRequest(body))
}
404 => {
let body = response.into_body();
let body = body
- .to_raw()
+ .into_raw()
.map_err(|e| ApiError(format!("Failed to read response: {}", e)))
.await?;
let body = str::from_utf8(&body)
.map_err(|e| ApiError(format!("Response was not valid UTF8: {}", e)))?;
- let body = serde_json::from_str::<models::ErrorResponse>(body)?;
+ let body = serde_json::from_str::<models::ErrorResponse>(body).map_err(|e| {
+ ApiError(format!("Response body did not match the schema: {}", e))
+ })?;
Ok(GetFilesetRedirectsResponse::NotFound(body))
}
500 => {
let body = response.into_body();
let body = body
- .to_raw()
+ .into_raw()
.map_err(|e| ApiError(format!("Failed to read response: {}", e)))
.await?;
let body = str::from_utf8(&body)
.map_err(|e| ApiError(format!("Response was not valid UTF8: {}", e)))?;
- let body = serde_json::from_str::<models::ErrorResponse>(body)?;
+ let body = serde_json::from_str::<models::ErrorResponse>(body).map_err(|e| {
+ ApiError(format!("Response body did not match the schema: {}", e))
+ })?;
Ok(GetFilesetRedirectsResponse::GenericError(body))
}
code => {
let headers = response.headers().clone();
- let body = response.into_body().take(100).to_raw().await;
+ let body = response.into_body().take(100).into_raw().await;
Err(ApiError(format!(
"Unexpected response code {}:\n{:?}\n\n{}",
code,
@@ -11075,50 +11720,58 @@ where
200 => {
let body = response.into_body();
let body = body
- .to_raw()
+ .into_raw()
.map_err(|e| ApiError(format!("Failed to read response: {}", e)))
.await?;
let body = str::from_utf8(&body)
.map_err(|e| ApiError(format!("Response was not valid UTF8: {}", e)))?;
- let body = serde_json::from_str::<models::FilesetEntity>(body)?;
+ let body = serde_json::from_str::<models::FilesetEntity>(body).map_err(|e| {
+ ApiError(format!("Response body did not match the schema: {}", e))
+ })?;
Ok(GetFilesetRevisionResponse::FoundEntityRevision(body))
}
400 => {
let body = response.into_body();
let body = body
- .to_raw()
+ .into_raw()
.map_err(|e| ApiError(format!("Failed to read response: {}", e)))
.await?;
let body = str::from_utf8(&body)
.map_err(|e| ApiError(format!("Response was not valid UTF8: {}", e)))?;
- let body = serde_json::from_str::<models::ErrorResponse>(body)?;
+ let body = serde_json::from_str::<models::ErrorResponse>(body).map_err(|e| {
+ ApiError(format!("Response body did not match the schema: {}", e))
+ })?;
Ok(GetFilesetRevisionResponse::BadRequest(body))
}
404 => {
let body = response.into_body();
let body = body
- .to_raw()
+ .into_raw()
.map_err(|e| ApiError(format!("Failed to read response: {}", e)))
.await?;
let body = str::from_utf8(&body)
.map_err(|e| ApiError(format!("Response was not valid UTF8: {}", e)))?;
- let body = serde_json::from_str::<models::ErrorResponse>(body)?;
+ let body = serde_json::from_str::<models::ErrorResponse>(body).map_err(|e| {
+ ApiError(format!("Response body did not match the schema: {}", e))
+ })?;
Ok(GetFilesetRevisionResponse::NotFound(body))
}
500 => {
let body = response.into_body();
let body = body
- .to_raw()
+ .into_raw()
.map_err(|e| ApiError(format!("Failed to read response: {}", e)))
.await?;
let body = str::from_utf8(&body)
.map_err(|e| ApiError(format!("Response was not valid UTF8: {}", e)))?;
- let body = serde_json::from_str::<models::ErrorResponse>(body)?;
+ let body = serde_json::from_str::<models::ErrorResponse>(body).map_err(|e| {
+ ApiError(format!("Response body did not match the schema: {}", e))
+ })?;
Ok(GetFilesetRevisionResponse::GenericError(body))
}
code => {
let headers = response.headers().clone();
- let body = response.into_body().take(100).to_raw().await;
+ let body = response.into_body().take(100).into_raw().await;
Err(ApiError(format!(
"Unexpected response code {}:\n{:?}\n\n{}",
code,
@@ -11208,50 +11861,58 @@ where
200 => {
let body = response.into_body();
let body = body
- .to_raw()
+ .into_raw()
.map_err(|e| ApiError(format!("Failed to read response: {}", e)))
.await?;
let body = str::from_utf8(&body)
.map_err(|e| ApiError(format!("Response was not valid UTF8: {}", e)))?;
- let body = serde_json::from_str::<models::ReleaseEntity>(body)?;
+ let body = serde_json::from_str::<models::ReleaseEntity>(body).map_err(|e| {
+ ApiError(format!("Response body did not match the schema: {}", e))
+ })?;
Ok(GetReleaseResponse::FoundEntity(body))
}
400 => {
let body = response.into_body();
let body = body
- .to_raw()
+ .into_raw()
.map_err(|e| ApiError(format!("Failed to read response: {}", e)))
.await?;
let body = str::from_utf8(&body)
.map_err(|e| ApiError(format!("Response was not valid UTF8: {}", e)))?;
- let body = serde_json::from_str::<models::ErrorResponse>(body)?;
+ let body = serde_json::from_str::<models::ErrorResponse>(body).map_err(|e| {
+ ApiError(format!("Response body did not match the schema: {}", e))
+ })?;
Ok(GetReleaseResponse::BadRequest(body))
}
404 => {
let body = response.into_body();
let body = body
- .to_raw()
+ .into_raw()
.map_err(|e| ApiError(format!("Failed to read response: {}", e)))
.await?;
let body = str::from_utf8(&body)
.map_err(|e| ApiError(format!("Response was not valid UTF8: {}", e)))?;
- let body = serde_json::from_str::<models::ErrorResponse>(body)?;
+ let body = serde_json::from_str::<models::ErrorResponse>(body).map_err(|e| {
+ ApiError(format!("Response body did not match the schema: {}", e))
+ })?;
Ok(GetReleaseResponse::NotFound(body))
}
500 => {
let body = response.into_body();
let body = body
- .to_raw()
+ .into_raw()
.map_err(|e| ApiError(format!("Failed to read response: {}", e)))
.await?;
let body = str::from_utf8(&body)
.map_err(|e| ApiError(format!("Response was not valid UTF8: {}", e)))?;
- let body = serde_json::from_str::<models::ErrorResponse>(body)?;
+ let body = serde_json::from_str::<models::ErrorResponse>(body).map_err(|e| {
+ ApiError(format!("Response body did not match the schema: {}", e))
+ })?;
Ok(GetReleaseResponse::GenericError(body))
}
code => {
let headers = response.headers().clone();
- let body = response.into_body().take(100).to_raw().await;
+ let body = response.into_body().take(100).into_raw().await;
Err(ApiError(format!(
"Unexpected response code {}:\n{:?}\n\n{}",
code,
@@ -11333,50 +11994,58 @@ where
200 => {
let body = response.into_body();
let body = body
- .to_raw()
+ .into_raw()
.map_err(|e| ApiError(format!("Failed to read response: {}", e)))
.await?;
let body = str::from_utf8(&body)
.map_err(|e| ApiError(format!("Response was not valid UTF8: {}", e)))?;
- let body = serde_json::from_str::<models::EntityEdit>(body)?;
+ let body = serde_json::from_str::<models::EntityEdit>(body).map_err(|e| {
+ ApiError(format!("Response body did not match the schema: {}", e))
+ })?;
Ok(GetReleaseEditResponse::FoundEdit(body))
}
400 => {
let body = response.into_body();
let body = body
- .to_raw()
+ .into_raw()
.map_err(|e| ApiError(format!("Failed to read response: {}", e)))
.await?;
let body = str::from_utf8(&body)
.map_err(|e| ApiError(format!("Response was not valid UTF8: {}", e)))?;
- let body = serde_json::from_str::<models::ErrorResponse>(body)?;
+ let body = serde_json::from_str::<models::ErrorResponse>(body).map_err(|e| {
+ ApiError(format!("Response body did not match the schema: {}", e))
+ })?;
Ok(GetReleaseEditResponse::BadRequest(body))
}
404 => {
let body = response.into_body();
let body = body
- .to_raw()
+ .into_raw()
.map_err(|e| ApiError(format!("Failed to read response: {}", e)))
.await?;
let body = str::from_utf8(&body)
.map_err(|e| ApiError(format!("Response was not valid UTF8: {}", e)))?;
- let body = serde_json::from_str::<models::ErrorResponse>(body)?;
+ let body = serde_json::from_str::<models::ErrorResponse>(body).map_err(|e| {
+ ApiError(format!("Response body did not match the schema: {}", e))
+ })?;
Ok(GetReleaseEditResponse::NotFound(body))
}
500 => {
let body = response.into_body();
let body = body
- .to_raw()
+ .into_raw()
.map_err(|e| ApiError(format!("Failed to read response: {}", e)))
.await?;
let body = str::from_utf8(&body)
.map_err(|e| ApiError(format!("Response was not valid UTF8: {}", e)))?;
- let body = serde_json::from_str::<models::ErrorResponse>(body)?;
+ let body = serde_json::from_str::<models::ErrorResponse>(body).map_err(|e| {
+ ApiError(format!("Response body did not match the schema: {}", e))
+ })?;
Ok(GetReleaseEditResponse::GenericError(body))
}
code => {
let headers = response.headers().clone();
- let body = response.into_body().take(100).to_raw().await;
+ let body = response.into_body().take(100).into_raw().await;
Err(ApiError(format!(
"Unexpected response code {}:\n{:?}\n\n{}",
code,
@@ -11462,50 +12131,58 @@ where
200 => {
let body = response.into_body();
let body = body
- .to_raw()
+ .into_raw()
.map_err(|e| ApiError(format!("Failed to read response: {}", e)))
.await?;
let body = str::from_utf8(&body)
.map_err(|e| ApiError(format!("Response was not valid UTF8: {}", e)))?;
- let body = serde_json::from_str::<Vec<models::FileEntity>>(body)?;
+ let body = serde_json::from_str::<Vec<models::FileEntity>>(body).map_err(|e| {
+ ApiError(format!("Response body did not match the schema: {}", e))
+ })?;
Ok(GetReleaseFilesResponse::Found(body))
}
400 => {
let body = response.into_body();
let body = body
- .to_raw()
+ .into_raw()
.map_err(|e| ApiError(format!("Failed to read response: {}", e)))
.await?;
let body = str::from_utf8(&body)
.map_err(|e| ApiError(format!("Response was not valid UTF8: {}", e)))?;
- let body = serde_json::from_str::<models::ErrorResponse>(body)?;
+ let body = serde_json::from_str::<models::ErrorResponse>(body).map_err(|e| {
+ ApiError(format!("Response body did not match the schema: {}", e))
+ })?;
Ok(GetReleaseFilesResponse::BadRequest(body))
}
404 => {
let body = response.into_body();
let body = body
- .to_raw()
+ .into_raw()
.map_err(|e| ApiError(format!("Failed to read response: {}", e)))
.await?;
let body = str::from_utf8(&body)
.map_err(|e| ApiError(format!("Response was not valid UTF8: {}", e)))?;
- let body = serde_json::from_str::<models::ErrorResponse>(body)?;
+ let body = serde_json::from_str::<models::ErrorResponse>(body).map_err(|e| {
+ ApiError(format!("Response body did not match the schema: {}", e))
+ })?;
Ok(GetReleaseFilesResponse::NotFound(body))
}
500 => {
let body = response.into_body();
let body = body
- .to_raw()
+ .into_raw()
.map_err(|e| ApiError(format!("Failed to read response: {}", e)))
.await?;
let body = str::from_utf8(&body)
.map_err(|e| ApiError(format!("Response was not valid UTF8: {}", e)))?;
- let body = serde_json::from_str::<models::ErrorResponse>(body)?;
+ let body = serde_json::from_str::<models::ErrorResponse>(body).map_err(|e| {
+ ApiError(format!("Response body did not match the schema: {}", e))
+ })?;
Ok(GetReleaseFilesResponse::GenericError(body))
}
code => {
let headers = response.headers().clone();
- let body = response.into_body().take(100).to_raw().await;
+ let body = response.into_body().take(100).into_raw().await;
Err(ApiError(format!(
"Unexpected response code {}:\n{:?}\n\n{}",
code,
@@ -11591,50 +12268,59 @@ where
200 => {
let body = response.into_body();
let body = body
- .to_raw()
+ .into_raw()
.map_err(|e| ApiError(format!("Failed to read response: {}", e)))
.await?;
let body = str::from_utf8(&body)
.map_err(|e| ApiError(format!("Response was not valid UTF8: {}", e)))?;
- let body = serde_json::from_str::<Vec<models::FilesetEntity>>(body)?;
+ let body =
+ serde_json::from_str::<Vec<models::FilesetEntity>>(body).map_err(|e| {
+ ApiError(format!("Response body did not match the schema: {}", e))
+ })?;
Ok(GetReleaseFilesetsResponse::Found(body))
}
400 => {
let body = response.into_body();
let body = body
- .to_raw()
+ .into_raw()
.map_err(|e| ApiError(format!("Failed to read response: {}", e)))
.await?;
let body = str::from_utf8(&body)
.map_err(|e| ApiError(format!("Response was not valid UTF8: {}", e)))?;
- let body = serde_json::from_str::<models::ErrorResponse>(body)?;
+ let body = serde_json::from_str::<models::ErrorResponse>(body).map_err(|e| {
+ ApiError(format!("Response body did not match the schema: {}", e))
+ })?;
Ok(GetReleaseFilesetsResponse::BadRequest(body))
}
404 => {
let body = response.into_body();
let body = body
- .to_raw()
+ .into_raw()
.map_err(|e| ApiError(format!("Failed to read response: {}", e)))
.await?;
let body = str::from_utf8(&body)
.map_err(|e| ApiError(format!("Response was not valid UTF8: {}", e)))?;
- let body = serde_json::from_str::<models::ErrorResponse>(body)?;
+ let body = serde_json::from_str::<models::ErrorResponse>(body).map_err(|e| {
+ ApiError(format!("Response body did not match the schema: {}", e))
+ })?;
Ok(GetReleaseFilesetsResponse::NotFound(body))
}
500 => {
let body = response.into_body();
let body = body
- .to_raw()
+ .into_raw()
.map_err(|e| ApiError(format!("Failed to read response: {}", e)))
.await?;
let body = str::from_utf8(&body)
.map_err(|e| ApiError(format!("Response was not valid UTF8: {}", e)))?;
- let body = serde_json::from_str::<models::ErrorResponse>(body)?;
+ let body = serde_json::from_str::<models::ErrorResponse>(body).map_err(|e| {
+ ApiError(format!("Response body did not match the schema: {}", e))
+ })?;
Ok(GetReleaseFilesetsResponse::GenericError(body))
}
code => {
let headers = response.headers().clone();
- let body = response.into_body().take(100).to_raw().await;
+ let body = response.into_body().take(100).into_raw().await;
Err(ApiError(format!(
"Unexpected response code {}:\n{:?}\n\n{}",
code,
@@ -11720,50 +12406,59 @@ where
200 => {
let body = response.into_body();
let body = body
- .to_raw()
+ .into_raw()
.map_err(|e| ApiError(format!("Failed to read response: {}", e)))
.await?;
let body = str::from_utf8(&body)
.map_err(|e| ApiError(format!("Response was not valid UTF8: {}", e)))?;
- let body = serde_json::from_str::<Vec<models::EntityHistoryEntry>>(body)?;
+ let body =
+ serde_json::from_str::<Vec<models::EntityHistoryEntry>>(body).map_err(|e| {
+ ApiError(format!("Response body did not match the schema: {}", e))
+ })?;
Ok(GetReleaseHistoryResponse::FoundEntityHistory(body))
}
400 => {
let body = response.into_body();
let body = body
- .to_raw()
+ .into_raw()
.map_err(|e| ApiError(format!("Failed to read response: {}", e)))
.await?;
let body = str::from_utf8(&body)
.map_err(|e| ApiError(format!("Response was not valid UTF8: {}", e)))?;
- let body = serde_json::from_str::<models::ErrorResponse>(body)?;
+ let body = serde_json::from_str::<models::ErrorResponse>(body).map_err(|e| {
+ ApiError(format!("Response body did not match the schema: {}", e))
+ })?;
Ok(GetReleaseHistoryResponse::BadRequest(body))
}
404 => {
let body = response.into_body();
let body = body
- .to_raw()
+ .into_raw()
.map_err(|e| ApiError(format!("Failed to read response: {}", e)))
.await?;
let body = str::from_utf8(&body)
.map_err(|e| ApiError(format!("Response was not valid UTF8: {}", e)))?;
- let body = serde_json::from_str::<models::ErrorResponse>(body)?;
+ let body = serde_json::from_str::<models::ErrorResponse>(body).map_err(|e| {
+ ApiError(format!("Response body did not match the schema: {}", e))
+ })?;
Ok(GetReleaseHistoryResponse::NotFound(body))
}
500 => {
let body = response.into_body();
let body = body
- .to_raw()
+ .into_raw()
.map_err(|e| ApiError(format!("Failed to read response: {}", e)))
.await?;
let body = str::from_utf8(&body)
.map_err(|e| ApiError(format!("Response was not valid UTF8: {}", e)))?;
- let body = serde_json::from_str::<models::ErrorResponse>(body)?;
+ let body = serde_json::from_str::<models::ErrorResponse>(body).map_err(|e| {
+ ApiError(format!("Response body did not match the schema: {}", e))
+ })?;
Ok(GetReleaseHistoryResponse::GenericError(body))
}
code => {
let headers = response.headers().clone();
- let body = response.into_body().take(100).to_raw().await;
+ let body = response.into_body().take(100).into_raw().await;
Err(ApiError(format!(
"Unexpected response code {}:\n{:?}\n\n{}",
code,
@@ -11845,50 +12540,58 @@ where
200 => {
let body = response.into_body();
let body = body
- .to_raw()
+ .into_raw()
.map_err(|e| ApiError(format!("Failed to read response: {}", e)))
.await?;
let body = str::from_utf8(&body)
.map_err(|e| ApiError(format!("Response was not valid UTF8: {}", e)))?;
- let body = serde_json::from_str::<Vec<String>>(body)?;
+ let body = serde_json::from_str::<Vec<String>>(body).map_err(|e| {
+ ApiError(format!("Response body did not match the schema: {}", e))
+ })?;
Ok(GetReleaseRedirectsResponse::FoundEntityRedirects(body))
}
400 => {
let body = response.into_body();
let body = body
- .to_raw()
+ .into_raw()
.map_err(|e| ApiError(format!("Failed to read response: {}", e)))
.await?;
let body = str::from_utf8(&body)
.map_err(|e| ApiError(format!("Response was not valid UTF8: {}", e)))?;
- let body = serde_json::from_str::<models::ErrorResponse>(body)?;
+ let body = serde_json::from_str::<models::ErrorResponse>(body).map_err(|e| {
+ ApiError(format!("Response body did not match the schema: {}", e))
+ })?;
Ok(GetReleaseRedirectsResponse::BadRequest(body))
}
404 => {
let body = response.into_body();
let body = body
- .to_raw()
+ .into_raw()
.map_err(|e| ApiError(format!("Failed to read response: {}", e)))
.await?;
let body = str::from_utf8(&body)
.map_err(|e| ApiError(format!("Response was not valid UTF8: {}", e)))?;
- let body = serde_json::from_str::<models::ErrorResponse>(body)?;
+ let body = serde_json::from_str::<models::ErrorResponse>(body).map_err(|e| {
+ ApiError(format!("Response body did not match the schema: {}", e))
+ })?;
Ok(GetReleaseRedirectsResponse::NotFound(body))
}
500 => {
let body = response.into_body();
let body = body
- .to_raw()
+ .into_raw()
.map_err(|e| ApiError(format!("Failed to read response: {}", e)))
.await?;
let body = str::from_utf8(&body)
.map_err(|e| ApiError(format!("Response was not valid UTF8: {}", e)))?;
- let body = serde_json::from_str::<models::ErrorResponse>(body)?;
+ let body = serde_json::from_str::<models::ErrorResponse>(body).map_err(|e| {
+ ApiError(format!("Response body did not match the schema: {}", e))
+ })?;
Ok(GetReleaseRedirectsResponse::GenericError(body))
}
code => {
let headers = response.headers().clone();
- let body = response.into_body().take(100).to_raw().await;
+ let body = response.into_body().take(100).into_raw().await;
Err(ApiError(format!(
"Unexpected response code {}:\n{:?}\n\n{}",
code,
@@ -11978,50 +12681,58 @@ where
200 => {
let body = response.into_body();
let body = body
- .to_raw()
+ .into_raw()
.map_err(|e| ApiError(format!("Failed to read response: {}", e)))
.await?;
let body = str::from_utf8(&body)
.map_err(|e| ApiError(format!("Response was not valid UTF8: {}", e)))?;
- let body = serde_json::from_str::<models::ReleaseEntity>(body)?;
+ let body = serde_json::from_str::<models::ReleaseEntity>(body).map_err(|e| {
+ ApiError(format!("Response body did not match the schema: {}", e))
+ })?;
Ok(GetReleaseRevisionResponse::FoundEntityRevision(body))
}
400 => {
let body = response.into_body();
let body = body
- .to_raw()
+ .into_raw()
.map_err(|e| ApiError(format!("Failed to read response: {}", e)))
.await?;
let body = str::from_utf8(&body)
.map_err(|e| ApiError(format!("Response was not valid UTF8: {}", e)))?;
- let body = serde_json::from_str::<models::ErrorResponse>(body)?;
+ let body = serde_json::from_str::<models::ErrorResponse>(body).map_err(|e| {
+ ApiError(format!("Response body did not match the schema: {}", e))
+ })?;
Ok(GetReleaseRevisionResponse::BadRequest(body))
}
404 => {
let body = response.into_body();
let body = body
- .to_raw()
+ .into_raw()
.map_err(|e| ApiError(format!("Failed to read response: {}", e)))
.await?;
let body = str::from_utf8(&body)
.map_err(|e| ApiError(format!("Response was not valid UTF8: {}", e)))?;
- let body = serde_json::from_str::<models::ErrorResponse>(body)?;
+ let body = serde_json::from_str::<models::ErrorResponse>(body).map_err(|e| {
+ ApiError(format!("Response body did not match the schema: {}", e))
+ })?;
Ok(GetReleaseRevisionResponse::NotFound(body))
}
500 => {
let body = response.into_body();
let body = body
- .to_raw()
+ .into_raw()
.map_err(|e| ApiError(format!("Failed to read response: {}", e)))
.await?;
let body = str::from_utf8(&body)
.map_err(|e| ApiError(format!("Response was not valid UTF8: {}", e)))?;
- let body = serde_json::from_str::<models::ErrorResponse>(body)?;
+ let body = serde_json::from_str::<models::ErrorResponse>(body).map_err(|e| {
+ ApiError(format!("Response body did not match the schema: {}", e))
+ })?;
Ok(GetReleaseRevisionResponse::GenericError(body))
}
code => {
let headers = response.headers().clone();
- let body = response.into_body().take(100).to_raw().await;
+ let body = response.into_body().take(100).into_raw().await;
Err(ApiError(format!(
"Unexpected response code {}:\n{:?}\n\n{}",
code,
@@ -12107,50 +12818,59 @@ where
200 => {
let body = response.into_body();
let body = body
- .to_raw()
+ .into_raw()
.map_err(|e| ApiError(format!("Failed to read response: {}", e)))
.await?;
let body = str::from_utf8(&body)
.map_err(|e| ApiError(format!("Response was not valid UTF8: {}", e)))?;
- let body = serde_json::from_str::<Vec<models::WebcaptureEntity>>(body)?;
+ let body =
+ serde_json::from_str::<Vec<models::WebcaptureEntity>>(body).map_err(|e| {
+ ApiError(format!("Response body did not match the schema: {}", e))
+ })?;
Ok(GetReleaseWebcapturesResponse::Found(body))
}
400 => {
let body = response.into_body();
let body = body
- .to_raw()
+ .into_raw()
.map_err(|e| ApiError(format!("Failed to read response: {}", e)))
.await?;
let body = str::from_utf8(&body)
.map_err(|e| ApiError(format!("Response was not valid UTF8: {}", e)))?;
- let body = serde_json::from_str::<models::ErrorResponse>(body)?;
+ let body = serde_json::from_str::<models::ErrorResponse>(body).map_err(|e| {
+ ApiError(format!("Response body did not match the schema: {}", e))
+ })?;
Ok(GetReleaseWebcapturesResponse::BadRequest(body))
}
404 => {
let body = response.into_body();
let body = body
- .to_raw()
+ .into_raw()
.map_err(|e| ApiError(format!("Failed to read response: {}", e)))
.await?;
let body = str::from_utf8(&body)
.map_err(|e| ApiError(format!("Response was not valid UTF8: {}", e)))?;
- let body = serde_json::from_str::<models::ErrorResponse>(body)?;
+ let body = serde_json::from_str::<models::ErrorResponse>(body).map_err(|e| {
+ ApiError(format!("Response body did not match the schema: {}", e))
+ })?;
Ok(GetReleaseWebcapturesResponse::NotFound(body))
}
500 => {
let body = response.into_body();
let body = body
- .to_raw()
+ .into_raw()
.map_err(|e| ApiError(format!("Failed to read response: {}", e)))
.await?;
let body = str::from_utf8(&body)
.map_err(|e| ApiError(format!("Response was not valid UTF8: {}", e)))?;
- let body = serde_json::from_str::<models::ErrorResponse>(body)?;
+ let body = serde_json::from_str::<models::ErrorResponse>(body).map_err(|e| {
+ ApiError(format!("Response body did not match the schema: {}", e))
+ })?;
Ok(GetReleaseWebcapturesResponse::GenericError(body))
}
code => {
let headers = response.headers().clone();
- let body = response.into_body().take(100).to_raw().await;
+ let body = response.into_body().take(100).into_raw().await;
Err(ApiError(format!(
"Unexpected response code {}:\n{:?}\n\n{}",
code,
@@ -12240,50 +12960,58 @@ where
200 => {
let body = response.into_body();
let body = body
- .to_raw()
+ .into_raw()
.map_err(|e| ApiError(format!("Failed to read response: {}", e)))
.await?;
let body = str::from_utf8(&body)
.map_err(|e| ApiError(format!("Response was not valid UTF8: {}", e)))?;
- let body = serde_json::from_str::<models::WebcaptureEntity>(body)?;
+ let body = serde_json::from_str::<models::WebcaptureEntity>(body).map_err(|e| {
+ ApiError(format!("Response body did not match the schema: {}", e))
+ })?;
Ok(GetWebcaptureResponse::FoundEntity(body))
}
400 => {
let body = response.into_body();
let body = body
- .to_raw()
+ .into_raw()
.map_err(|e| ApiError(format!("Failed to read response: {}", e)))
.await?;
let body = str::from_utf8(&body)
.map_err(|e| ApiError(format!("Response was not valid UTF8: {}", e)))?;
- let body = serde_json::from_str::<models::ErrorResponse>(body)?;
+ let body = serde_json::from_str::<models::ErrorResponse>(body).map_err(|e| {
+ ApiError(format!("Response body did not match the schema: {}", e))
+ })?;
Ok(GetWebcaptureResponse::BadRequest(body))
}
404 => {
let body = response.into_body();
let body = body
- .to_raw()
+ .into_raw()
.map_err(|e| ApiError(format!("Failed to read response: {}", e)))
.await?;
let body = str::from_utf8(&body)
.map_err(|e| ApiError(format!("Response was not valid UTF8: {}", e)))?;
- let body = serde_json::from_str::<models::ErrorResponse>(body)?;
+ let body = serde_json::from_str::<models::ErrorResponse>(body).map_err(|e| {
+ ApiError(format!("Response body did not match the schema: {}", e))
+ })?;
Ok(GetWebcaptureResponse::NotFound(body))
}
500 => {
let body = response.into_body();
let body = body
- .to_raw()
+ .into_raw()
.map_err(|e| ApiError(format!("Failed to read response: {}", e)))
.await?;
let body = str::from_utf8(&body)
.map_err(|e| ApiError(format!("Response was not valid UTF8: {}", e)))?;
- let body = serde_json::from_str::<models::ErrorResponse>(body)?;
+ let body = serde_json::from_str::<models::ErrorResponse>(body).map_err(|e| {
+ ApiError(format!("Response body did not match the schema: {}", e))
+ })?;
Ok(GetWebcaptureResponse::GenericError(body))
}
code => {
let headers = response.headers().clone();
- let body = response.into_body().take(100).to_raw().await;
+ let body = response.into_body().take(100).into_raw().await;
Err(ApiError(format!(
"Unexpected response code {}:\n{:?}\n\n{}",
code,
@@ -12365,50 +13093,58 @@ where
200 => {
let body = response.into_body();
let body = body
- .to_raw()
+ .into_raw()
.map_err(|e| ApiError(format!("Failed to read response: {}", e)))
.await?;
let body = str::from_utf8(&body)
.map_err(|e| ApiError(format!("Response was not valid UTF8: {}", e)))?;
- let body = serde_json::from_str::<models::EntityEdit>(body)?;
+ let body = serde_json::from_str::<models::EntityEdit>(body).map_err(|e| {
+ ApiError(format!("Response body did not match the schema: {}", e))
+ })?;
Ok(GetWebcaptureEditResponse::FoundEdit(body))
}
400 => {
let body = response.into_body();
let body = body
- .to_raw()
+ .into_raw()
.map_err(|e| ApiError(format!("Failed to read response: {}", e)))
.await?;
let body = str::from_utf8(&body)
.map_err(|e| ApiError(format!("Response was not valid UTF8: {}", e)))?;
- let body = serde_json::from_str::<models::ErrorResponse>(body)?;
+ let body = serde_json::from_str::<models::ErrorResponse>(body).map_err(|e| {
+ ApiError(format!("Response body did not match the schema: {}", e))
+ })?;
Ok(GetWebcaptureEditResponse::BadRequest(body))
}
404 => {
let body = response.into_body();
let body = body
- .to_raw()
+ .into_raw()
.map_err(|e| ApiError(format!("Failed to read response: {}", e)))
.await?;
let body = str::from_utf8(&body)
.map_err(|e| ApiError(format!("Response was not valid UTF8: {}", e)))?;
- let body = serde_json::from_str::<models::ErrorResponse>(body)?;
+ let body = serde_json::from_str::<models::ErrorResponse>(body).map_err(|e| {
+ ApiError(format!("Response body did not match the schema: {}", e))
+ })?;
Ok(GetWebcaptureEditResponse::NotFound(body))
}
500 => {
let body = response.into_body();
let body = body
- .to_raw()
+ .into_raw()
.map_err(|e| ApiError(format!("Failed to read response: {}", e)))
.await?;
let body = str::from_utf8(&body)
.map_err(|e| ApiError(format!("Response was not valid UTF8: {}", e)))?;
- let body = serde_json::from_str::<models::ErrorResponse>(body)?;
+ let body = serde_json::from_str::<models::ErrorResponse>(body).map_err(|e| {
+ ApiError(format!("Response body did not match the schema: {}", e))
+ })?;
Ok(GetWebcaptureEditResponse::GenericError(body))
}
code => {
let headers = response.headers().clone();
- let body = response.into_body().take(100).to_raw().await;
+ let body = response.into_body().take(100).into_raw().await;
Err(ApiError(format!(
"Unexpected response code {}:\n{:?}\n\n{}",
code,
@@ -12494,50 +13230,59 @@ where
200 => {
let body = response.into_body();
let body = body
- .to_raw()
+ .into_raw()
.map_err(|e| ApiError(format!("Failed to read response: {}", e)))
.await?;
let body = str::from_utf8(&body)
.map_err(|e| ApiError(format!("Response was not valid UTF8: {}", e)))?;
- let body = serde_json::from_str::<Vec<models::EntityHistoryEntry>>(body)?;
+ let body =
+ serde_json::from_str::<Vec<models::EntityHistoryEntry>>(body).map_err(|e| {
+ ApiError(format!("Response body did not match the schema: {}", e))
+ })?;
Ok(GetWebcaptureHistoryResponse::FoundEntityHistory(body))
}
400 => {
let body = response.into_body();
let body = body
- .to_raw()
+ .into_raw()
.map_err(|e| ApiError(format!("Failed to read response: {}", e)))
.await?;
let body = str::from_utf8(&body)
.map_err(|e| ApiError(format!("Response was not valid UTF8: {}", e)))?;
- let body = serde_json::from_str::<models::ErrorResponse>(body)?;
+ let body = serde_json::from_str::<models::ErrorResponse>(body).map_err(|e| {
+ ApiError(format!("Response body did not match the schema: {}", e))
+ })?;
Ok(GetWebcaptureHistoryResponse::BadRequest(body))
}
404 => {
let body = response.into_body();
let body = body
- .to_raw()
+ .into_raw()
.map_err(|e| ApiError(format!("Failed to read response: {}", e)))
.await?;
let body = str::from_utf8(&body)
.map_err(|e| ApiError(format!("Response was not valid UTF8: {}", e)))?;
- let body = serde_json::from_str::<models::ErrorResponse>(body)?;
+ let body = serde_json::from_str::<models::ErrorResponse>(body).map_err(|e| {
+ ApiError(format!("Response body did not match the schema: {}", e))
+ })?;
Ok(GetWebcaptureHistoryResponse::NotFound(body))
}
500 => {
let body = response.into_body();
let body = body
- .to_raw()
+ .into_raw()
.map_err(|e| ApiError(format!("Failed to read response: {}", e)))
.await?;
let body = str::from_utf8(&body)
.map_err(|e| ApiError(format!("Response was not valid UTF8: {}", e)))?;
- let body = serde_json::from_str::<models::ErrorResponse>(body)?;
+ let body = serde_json::from_str::<models::ErrorResponse>(body).map_err(|e| {
+ ApiError(format!("Response body did not match the schema: {}", e))
+ })?;
Ok(GetWebcaptureHistoryResponse::GenericError(body))
}
code => {
let headers = response.headers().clone();
- let body = response.into_body().take(100).to_raw().await;
+ let body = response.into_body().take(100).into_raw().await;
Err(ApiError(format!(
"Unexpected response code {}:\n{:?}\n\n{}",
code,
@@ -12619,50 +13364,58 @@ where
200 => {
let body = response.into_body();
let body = body
- .to_raw()
+ .into_raw()
.map_err(|e| ApiError(format!("Failed to read response: {}", e)))
.await?;
let body = str::from_utf8(&body)
.map_err(|e| ApiError(format!("Response was not valid UTF8: {}", e)))?;
- let body = serde_json::from_str::<Vec<String>>(body)?;
+ let body = serde_json::from_str::<Vec<String>>(body).map_err(|e| {
+ ApiError(format!("Response body did not match the schema: {}", e))
+ })?;
Ok(GetWebcaptureRedirectsResponse::FoundEntityRedirects(body))
}
400 => {
let body = response.into_body();
let body = body
- .to_raw()
+ .into_raw()
.map_err(|e| ApiError(format!("Failed to read response: {}", e)))
.await?;
let body = str::from_utf8(&body)
.map_err(|e| ApiError(format!("Response was not valid UTF8: {}", e)))?;
- let body = serde_json::from_str::<models::ErrorResponse>(body)?;
+ let body = serde_json::from_str::<models::ErrorResponse>(body).map_err(|e| {
+ ApiError(format!("Response body did not match the schema: {}", e))
+ })?;
Ok(GetWebcaptureRedirectsResponse::BadRequest(body))
}
404 => {
let body = response.into_body();
let body = body
- .to_raw()
+ .into_raw()
.map_err(|e| ApiError(format!("Failed to read response: {}", e)))
.await?;
let body = str::from_utf8(&body)
.map_err(|e| ApiError(format!("Response was not valid UTF8: {}", e)))?;
- let body = serde_json::from_str::<models::ErrorResponse>(body)?;
+ let body = serde_json::from_str::<models::ErrorResponse>(body).map_err(|e| {
+ ApiError(format!("Response body did not match the schema: {}", e))
+ })?;
Ok(GetWebcaptureRedirectsResponse::NotFound(body))
}
500 => {
let body = response.into_body();
let body = body
- .to_raw()
+ .into_raw()
.map_err(|e| ApiError(format!("Failed to read response: {}", e)))
.await?;
let body = str::from_utf8(&body)
.map_err(|e| ApiError(format!("Response was not valid UTF8: {}", e)))?;
- let body = serde_json::from_str::<models::ErrorResponse>(body)?;
+ let body = serde_json::from_str::<models::ErrorResponse>(body).map_err(|e| {
+ ApiError(format!("Response body did not match the schema: {}", e))
+ })?;
Ok(GetWebcaptureRedirectsResponse::GenericError(body))
}
code => {
let headers = response.headers().clone();
- let body = response.into_body().take(100).to_raw().await;
+ let body = response.into_body().take(100).into_raw().await;
Err(ApiError(format!(
"Unexpected response code {}:\n{:?}\n\n{}",
code,
@@ -12752,50 +13505,58 @@ where
200 => {
let body = response.into_body();
let body = body
- .to_raw()
+ .into_raw()
.map_err(|e| ApiError(format!("Failed to read response: {}", e)))
.await?;
let body = str::from_utf8(&body)
.map_err(|e| ApiError(format!("Response was not valid UTF8: {}", e)))?;
- let body = serde_json::from_str::<models::WebcaptureEntity>(body)?;
+ let body = serde_json::from_str::<models::WebcaptureEntity>(body).map_err(|e| {
+ ApiError(format!("Response body did not match the schema: {}", e))
+ })?;
Ok(GetWebcaptureRevisionResponse::FoundEntityRevision(body))
}
400 => {
let body = response.into_body();
let body = body
- .to_raw()
+ .into_raw()
.map_err(|e| ApiError(format!("Failed to read response: {}", e)))
.await?;
let body = str::from_utf8(&body)
.map_err(|e| ApiError(format!("Response was not valid UTF8: {}", e)))?;
- let body = serde_json::from_str::<models::ErrorResponse>(body)?;
+ let body = serde_json::from_str::<models::ErrorResponse>(body).map_err(|e| {
+ ApiError(format!("Response body did not match the schema: {}", e))
+ })?;
Ok(GetWebcaptureRevisionResponse::BadRequest(body))
}
404 => {
let body = response.into_body();
let body = body
- .to_raw()
+ .into_raw()
.map_err(|e| ApiError(format!("Failed to read response: {}", e)))
.await?;
let body = str::from_utf8(&body)
.map_err(|e| ApiError(format!("Response was not valid UTF8: {}", e)))?;
- let body = serde_json::from_str::<models::ErrorResponse>(body)?;
+ let body = serde_json::from_str::<models::ErrorResponse>(body).map_err(|e| {
+ ApiError(format!("Response body did not match the schema: {}", e))
+ })?;
Ok(GetWebcaptureRevisionResponse::NotFound(body))
}
500 => {
let body = response.into_body();
let body = body
- .to_raw()
+ .into_raw()
.map_err(|e| ApiError(format!("Failed to read response: {}", e)))
.await?;
let body = str::from_utf8(&body)
.map_err(|e| ApiError(format!("Response was not valid UTF8: {}", e)))?;
- let body = serde_json::from_str::<models::ErrorResponse>(body)?;
+ let body = serde_json::from_str::<models::ErrorResponse>(body).map_err(|e| {
+ ApiError(format!("Response body did not match the schema: {}", e))
+ })?;
Ok(GetWebcaptureRevisionResponse::GenericError(body))
}
code => {
let headers = response.headers().clone();
- let body = response.into_body().take(100).to_raw().await;
+ let body = response.into_body().take(100).into_raw().await;
Err(ApiError(format!(
"Unexpected response code {}:\n{:?}\n\n{}",
code,
@@ -12885,50 +13646,58 @@ where
200 => {
let body = response.into_body();
let body = body
- .to_raw()
+ .into_raw()
.map_err(|e| ApiError(format!("Failed to read response: {}", e)))
.await?;
let body = str::from_utf8(&body)
.map_err(|e| ApiError(format!("Response was not valid UTF8: {}", e)))?;
- let body = serde_json::from_str::<models::WorkEntity>(body)?;
+ let body = serde_json::from_str::<models::WorkEntity>(body).map_err(|e| {
+ ApiError(format!("Response body did not match the schema: {}", e))
+ })?;
Ok(GetWorkResponse::FoundEntity(body))
}
400 => {
let body = response.into_body();
let body = body
- .to_raw()
+ .into_raw()
.map_err(|e| ApiError(format!("Failed to read response: {}", e)))
.await?;
let body = str::from_utf8(&body)
.map_err(|e| ApiError(format!("Response was not valid UTF8: {}", e)))?;
- let body = serde_json::from_str::<models::ErrorResponse>(body)?;
+ let body = serde_json::from_str::<models::ErrorResponse>(body).map_err(|e| {
+ ApiError(format!("Response body did not match the schema: {}", e))
+ })?;
Ok(GetWorkResponse::BadRequest(body))
}
404 => {
let body = response.into_body();
let body = body
- .to_raw()
+ .into_raw()
.map_err(|e| ApiError(format!("Failed to read response: {}", e)))
.await?;
let body = str::from_utf8(&body)
.map_err(|e| ApiError(format!("Response was not valid UTF8: {}", e)))?;
- let body = serde_json::from_str::<models::ErrorResponse>(body)?;
+ let body = serde_json::from_str::<models::ErrorResponse>(body).map_err(|e| {
+ ApiError(format!("Response body did not match the schema: {}", e))
+ })?;
Ok(GetWorkResponse::NotFound(body))
}
500 => {
let body = response.into_body();
let body = body
- .to_raw()
+ .into_raw()
.map_err(|e| ApiError(format!("Failed to read response: {}", e)))
.await?;
let body = str::from_utf8(&body)
.map_err(|e| ApiError(format!("Response was not valid UTF8: {}", e)))?;
- let body = serde_json::from_str::<models::ErrorResponse>(body)?;
+ let body = serde_json::from_str::<models::ErrorResponse>(body).map_err(|e| {
+ ApiError(format!("Response body did not match the schema: {}", e))
+ })?;
Ok(GetWorkResponse::GenericError(body))
}
code => {
let headers = response.headers().clone();
- let body = response.into_body().take(100).to_raw().await;
+ let body = response.into_body().take(100).into_raw().await;
Err(ApiError(format!(
"Unexpected response code {}:\n{:?}\n\n{}",
code,
@@ -13010,50 +13779,58 @@ where
200 => {
let body = response.into_body();
let body = body
- .to_raw()
+ .into_raw()
.map_err(|e| ApiError(format!("Failed to read response: {}", e)))
.await?;
let body = str::from_utf8(&body)
.map_err(|e| ApiError(format!("Response was not valid UTF8: {}", e)))?;
- let body = serde_json::from_str::<models::EntityEdit>(body)?;
+ let body = serde_json::from_str::<models::EntityEdit>(body).map_err(|e| {
+ ApiError(format!("Response body did not match the schema: {}", e))
+ })?;
Ok(GetWorkEditResponse::FoundEdit(body))
}
400 => {
let body = response.into_body();
let body = body
- .to_raw()
+ .into_raw()
.map_err(|e| ApiError(format!("Failed to read response: {}", e)))
.await?;
let body = str::from_utf8(&body)
.map_err(|e| ApiError(format!("Response was not valid UTF8: {}", e)))?;
- let body = serde_json::from_str::<models::ErrorResponse>(body)?;
+ let body = serde_json::from_str::<models::ErrorResponse>(body).map_err(|e| {
+ ApiError(format!("Response body did not match the schema: {}", e))
+ })?;
Ok(GetWorkEditResponse::BadRequest(body))
}
404 => {
let body = response.into_body();
let body = body
- .to_raw()
+ .into_raw()
.map_err(|e| ApiError(format!("Failed to read response: {}", e)))
.await?;
let body = str::from_utf8(&body)
.map_err(|e| ApiError(format!("Response was not valid UTF8: {}", e)))?;
- let body = serde_json::from_str::<models::ErrorResponse>(body)?;
+ let body = serde_json::from_str::<models::ErrorResponse>(body).map_err(|e| {
+ ApiError(format!("Response body did not match the schema: {}", e))
+ })?;
Ok(GetWorkEditResponse::NotFound(body))
}
500 => {
let body = response.into_body();
let body = body
- .to_raw()
+ .into_raw()
.map_err(|e| ApiError(format!("Failed to read response: {}", e)))
.await?;
let body = str::from_utf8(&body)
.map_err(|e| ApiError(format!("Response was not valid UTF8: {}", e)))?;
- let body = serde_json::from_str::<models::ErrorResponse>(body)?;
+ let body = serde_json::from_str::<models::ErrorResponse>(body).map_err(|e| {
+ ApiError(format!("Response body did not match the schema: {}", e))
+ })?;
Ok(GetWorkEditResponse::GenericError(body))
}
code => {
let headers = response.headers().clone();
- let body = response.into_body().take(100).to_raw().await;
+ let body = response.into_body().take(100).into_raw().await;
Err(ApiError(format!(
"Unexpected response code {}:\n{:?}\n\n{}",
code,
@@ -13139,50 +13916,59 @@ where
200 => {
let body = response.into_body();
let body = body
- .to_raw()
+ .into_raw()
.map_err(|e| ApiError(format!("Failed to read response: {}", e)))
.await?;
let body = str::from_utf8(&body)
.map_err(|e| ApiError(format!("Response was not valid UTF8: {}", e)))?;
- let body = serde_json::from_str::<Vec<models::EntityHistoryEntry>>(body)?;
+ let body =
+ serde_json::from_str::<Vec<models::EntityHistoryEntry>>(body).map_err(|e| {
+ ApiError(format!("Response body did not match the schema: {}", e))
+ })?;
Ok(GetWorkHistoryResponse::FoundEntityHistory(body))
}
400 => {
let body = response.into_body();
let body = body
- .to_raw()
+ .into_raw()
.map_err(|e| ApiError(format!("Failed to read response: {}", e)))
.await?;
let body = str::from_utf8(&body)
.map_err(|e| ApiError(format!("Response was not valid UTF8: {}", e)))?;
- let body = serde_json::from_str::<models::ErrorResponse>(body)?;
+ let body = serde_json::from_str::<models::ErrorResponse>(body).map_err(|e| {
+ ApiError(format!("Response body did not match the schema: {}", e))
+ })?;
Ok(GetWorkHistoryResponse::BadRequest(body))
}
404 => {
let body = response.into_body();
let body = body
- .to_raw()
+ .into_raw()
.map_err(|e| ApiError(format!("Failed to read response: {}", e)))
.await?;
let body = str::from_utf8(&body)
.map_err(|e| ApiError(format!("Response was not valid UTF8: {}", e)))?;
- let body = serde_json::from_str::<models::ErrorResponse>(body)?;
+ let body = serde_json::from_str::<models::ErrorResponse>(body).map_err(|e| {
+ ApiError(format!("Response body did not match the schema: {}", e))
+ })?;
Ok(GetWorkHistoryResponse::NotFound(body))
}
500 => {
let body = response.into_body();
let body = body
- .to_raw()
+ .into_raw()
.map_err(|e| ApiError(format!("Failed to read response: {}", e)))
.await?;
let body = str::from_utf8(&body)
.map_err(|e| ApiError(format!("Response was not valid UTF8: {}", e)))?;
- let body = serde_json::from_str::<models::ErrorResponse>(body)?;
+ let body = serde_json::from_str::<models::ErrorResponse>(body).map_err(|e| {
+ ApiError(format!("Response body did not match the schema: {}", e))
+ })?;
Ok(GetWorkHistoryResponse::GenericError(body))
}
code => {
let headers = response.headers().clone();
- let body = response.into_body().take(100).to_raw().await;
+ let body = response.into_body().take(100).into_raw().await;
Err(ApiError(format!(
"Unexpected response code {}:\n{:?}\n\n{}",
code,
@@ -13264,50 +14050,58 @@ where
200 => {
let body = response.into_body();
let body = body
- .to_raw()
+ .into_raw()
.map_err(|e| ApiError(format!("Failed to read response: {}", e)))
.await?;
let body = str::from_utf8(&body)
.map_err(|e| ApiError(format!("Response was not valid UTF8: {}", e)))?;
- let body = serde_json::from_str::<Vec<String>>(body)?;
+ let body = serde_json::from_str::<Vec<String>>(body).map_err(|e| {
+ ApiError(format!("Response body did not match the schema: {}", e))
+ })?;
Ok(GetWorkRedirectsResponse::FoundEntityRedirects(body))
}
400 => {
let body = response.into_body();
let body = body
- .to_raw()
+ .into_raw()
.map_err(|e| ApiError(format!("Failed to read response: {}", e)))
.await?;
let body = str::from_utf8(&body)
.map_err(|e| ApiError(format!("Response was not valid UTF8: {}", e)))?;
- let body = serde_json::from_str::<models::ErrorResponse>(body)?;
+ let body = serde_json::from_str::<models::ErrorResponse>(body).map_err(|e| {
+ ApiError(format!("Response body did not match the schema: {}", e))
+ })?;
Ok(GetWorkRedirectsResponse::BadRequest(body))
}
404 => {
let body = response.into_body();
let body = body
- .to_raw()
+ .into_raw()
.map_err(|e| ApiError(format!("Failed to read response: {}", e)))
.await?;
let body = str::from_utf8(&body)
.map_err(|e| ApiError(format!("Response was not valid UTF8: {}", e)))?;
- let body = serde_json::from_str::<models::ErrorResponse>(body)?;
+ let body = serde_json::from_str::<models::ErrorResponse>(body).map_err(|e| {
+ ApiError(format!("Response body did not match the schema: {}", e))
+ })?;
Ok(GetWorkRedirectsResponse::NotFound(body))
}
500 => {
let body = response.into_body();
let body = body
- .to_raw()
+ .into_raw()
.map_err(|e| ApiError(format!("Failed to read response: {}", e)))
.await?;
let body = str::from_utf8(&body)
.map_err(|e| ApiError(format!("Response was not valid UTF8: {}", e)))?;
- let body = serde_json::from_str::<models::ErrorResponse>(body)?;
+ let body = serde_json::from_str::<models::ErrorResponse>(body).map_err(|e| {
+ ApiError(format!("Response body did not match the schema: {}", e))
+ })?;
Ok(GetWorkRedirectsResponse::GenericError(body))
}
code => {
let headers = response.headers().clone();
- let body = response.into_body().take(100).to_raw().await;
+ let body = response.into_body().take(100).into_raw().await;
Err(ApiError(format!(
"Unexpected response code {}:\n{:?}\n\n{}",
code,
@@ -13393,50 +14187,59 @@ where
200 => {
let body = response.into_body();
let body = body
- .to_raw()
+ .into_raw()
.map_err(|e| ApiError(format!("Failed to read response: {}", e)))
.await?;
let body = str::from_utf8(&body)
.map_err(|e| ApiError(format!("Response was not valid UTF8: {}", e)))?;
- let body = serde_json::from_str::<Vec<models::ReleaseEntity>>(body)?;
+ let body =
+ serde_json::from_str::<Vec<models::ReleaseEntity>>(body).map_err(|e| {
+ ApiError(format!("Response body did not match the schema: {}", e))
+ })?;
Ok(GetWorkReleasesResponse::Found(body))
}
400 => {
let body = response.into_body();
let body = body
- .to_raw()
+ .into_raw()
.map_err(|e| ApiError(format!("Failed to read response: {}", e)))
.await?;
let body = str::from_utf8(&body)
.map_err(|e| ApiError(format!("Response was not valid UTF8: {}", e)))?;
- let body = serde_json::from_str::<models::ErrorResponse>(body)?;
+ let body = serde_json::from_str::<models::ErrorResponse>(body).map_err(|e| {
+ ApiError(format!("Response body did not match the schema: {}", e))
+ })?;
Ok(GetWorkReleasesResponse::BadRequest(body))
}
404 => {
let body = response.into_body();
let body = body
- .to_raw()
+ .into_raw()
.map_err(|e| ApiError(format!("Failed to read response: {}", e)))
.await?;
let body = str::from_utf8(&body)
.map_err(|e| ApiError(format!("Response was not valid UTF8: {}", e)))?;
- let body = serde_json::from_str::<models::ErrorResponse>(body)?;
+ let body = serde_json::from_str::<models::ErrorResponse>(body).map_err(|e| {
+ ApiError(format!("Response body did not match the schema: {}", e))
+ })?;
Ok(GetWorkReleasesResponse::NotFound(body))
}
500 => {
let body = response.into_body();
let body = body
- .to_raw()
+ .into_raw()
.map_err(|e| ApiError(format!("Failed to read response: {}", e)))
.await?;
let body = str::from_utf8(&body)
.map_err(|e| ApiError(format!("Response was not valid UTF8: {}", e)))?;
- let body = serde_json::from_str::<models::ErrorResponse>(body)?;
+ let body = serde_json::from_str::<models::ErrorResponse>(body).map_err(|e| {
+ ApiError(format!("Response body did not match the schema: {}", e))
+ })?;
Ok(GetWorkReleasesResponse::GenericError(body))
}
code => {
let headers = response.headers().clone();
- let body = response.into_body().take(100).to_raw().await;
+ let body = response.into_body().take(100).into_raw().await;
Err(ApiError(format!(
"Unexpected response code {}:\n{:?}\n\n{}",
code,
@@ -13526,50 +14329,58 @@ where
200 => {
let body = response.into_body();
let body = body
- .to_raw()
+ .into_raw()
.map_err(|e| ApiError(format!("Failed to read response: {}", e)))
.await?;
let body = str::from_utf8(&body)
.map_err(|e| ApiError(format!("Response was not valid UTF8: {}", e)))?;
- let body = serde_json::from_str::<models::WorkEntity>(body)?;
+ let body = serde_json::from_str::<models::WorkEntity>(body).map_err(|e| {
+ ApiError(format!("Response body did not match the schema: {}", e))
+ })?;
Ok(GetWorkRevisionResponse::FoundEntityRevision(body))
}
400 => {
let body = response.into_body();
let body = body
- .to_raw()
+ .into_raw()
.map_err(|e| ApiError(format!("Failed to read response: {}", e)))
.await?;
let body = str::from_utf8(&body)
.map_err(|e| ApiError(format!("Response was not valid UTF8: {}", e)))?;
- let body = serde_json::from_str::<models::ErrorResponse>(body)?;
+ let body = serde_json::from_str::<models::ErrorResponse>(body).map_err(|e| {
+ ApiError(format!("Response body did not match the schema: {}", e))
+ })?;
Ok(GetWorkRevisionResponse::BadRequest(body))
}
404 => {
let body = response.into_body();
let body = body
- .to_raw()
+ .into_raw()
.map_err(|e| ApiError(format!("Failed to read response: {}", e)))
.await?;
let body = str::from_utf8(&body)
.map_err(|e| ApiError(format!("Response was not valid UTF8: {}", e)))?;
- let body = serde_json::from_str::<models::ErrorResponse>(body)?;
+ let body = serde_json::from_str::<models::ErrorResponse>(body).map_err(|e| {
+ ApiError(format!("Response body did not match the schema: {}", e))
+ })?;
Ok(GetWorkRevisionResponse::NotFound(body))
}
500 => {
let body = response.into_body();
let body = body
- .to_raw()
+ .into_raw()
.map_err(|e| ApiError(format!("Failed to read response: {}", e)))
.await?;
let body = str::from_utf8(&body)
.map_err(|e| ApiError(format!("Response was not valid UTF8: {}", e)))?;
- let body = serde_json::from_str::<models::ErrorResponse>(body)?;
+ let body = serde_json::from_str::<models::ErrorResponse>(body).map_err(|e| {
+ ApiError(format!("Response body did not match the schema: {}", e))
+ })?;
Ok(GetWorkRevisionResponse::GenericError(body))
}
code => {
let headers = response.headers().clone();
- let body = response.into_body().take(100).to_raw().await;
+ let body = response.into_body().take(100).into_raw().await;
Err(ApiError(format!(
"Unexpected response code {}:\n{:?}\n\n{}",
code,
@@ -13674,50 +14485,58 @@ where
200 => {
let body = response.into_body();
let body = body
- .to_raw()
+ .into_raw()
.map_err(|e| ApiError(format!("Failed to read response: {}", e)))
.await?;
let body = str::from_utf8(&body)
.map_err(|e| ApiError(format!("Response was not valid UTF8: {}", e)))?;
- let body = serde_json::from_str::<models::ContainerEntity>(body)?;
+ let body = serde_json::from_str::<models::ContainerEntity>(body).map_err(|e| {
+ ApiError(format!("Response body did not match the schema: {}", e))
+ })?;
Ok(LookupContainerResponse::FoundEntity(body))
}
400 => {
let body = response.into_body();
let body = body
- .to_raw()
+ .into_raw()
.map_err(|e| ApiError(format!("Failed to read response: {}", e)))
.await?;
let body = str::from_utf8(&body)
.map_err(|e| ApiError(format!("Response was not valid UTF8: {}", e)))?;
- let body = serde_json::from_str::<models::ErrorResponse>(body)?;
+ let body = serde_json::from_str::<models::ErrorResponse>(body).map_err(|e| {
+ ApiError(format!("Response body did not match the schema: {}", e))
+ })?;
Ok(LookupContainerResponse::BadRequest(body))
}
404 => {
let body = response.into_body();
let body = body
- .to_raw()
+ .into_raw()
.map_err(|e| ApiError(format!("Failed to read response: {}", e)))
.await?;
let body = str::from_utf8(&body)
.map_err(|e| ApiError(format!("Response was not valid UTF8: {}", e)))?;
- let body = serde_json::from_str::<models::ErrorResponse>(body)?;
+ let body = serde_json::from_str::<models::ErrorResponse>(body).map_err(|e| {
+ ApiError(format!("Response body did not match the schema: {}", e))
+ })?;
Ok(LookupContainerResponse::NotFound(body))
}
500 => {
let body = response.into_body();
let body = body
- .to_raw()
+ .into_raw()
.map_err(|e| ApiError(format!("Failed to read response: {}", e)))
.await?;
let body = str::from_utf8(&body)
.map_err(|e| ApiError(format!("Response was not valid UTF8: {}", e)))?;
- let body = serde_json::from_str::<models::ErrorResponse>(body)?;
+ let body = serde_json::from_str::<models::ErrorResponse>(body).map_err(|e| {
+ ApiError(format!("Response body did not match the schema: {}", e))
+ })?;
Ok(LookupContainerResponse::GenericError(body))
}
code => {
let headers = response.headers().clone();
- let body = response.into_body().take(100).to_raw().await;
+ let body = response.into_body().take(100).into_raw().await;
Err(ApiError(format!(
"Unexpected response code {}:\n{:?}\n\n{}",
code,
@@ -13810,50 +14629,58 @@ where
200 => {
let body = response.into_body();
let body = body
- .to_raw()
+ .into_raw()
.map_err(|e| ApiError(format!("Failed to read response: {}", e)))
.await?;
let body = str::from_utf8(&body)
.map_err(|e| ApiError(format!("Response was not valid UTF8: {}", e)))?;
- let body = serde_json::from_str::<models::CreatorEntity>(body)?;
+ let body = serde_json::from_str::<models::CreatorEntity>(body).map_err(|e| {
+ ApiError(format!("Response body did not match the schema: {}", e))
+ })?;
Ok(LookupCreatorResponse::FoundEntity(body))
}
400 => {
let body = response.into_body();
let body = body
- .to_raw()
+ .into_raw()
.map_err(|e| ApiError(format!("Failed to read response: {}", e)))
.await?;
let body = str::from_utf8(&body)
.map_err(|e| ApiError(format!("Response was not valid UTF8: {}", e)))?;
- let body = serde_json::from_str::<models::ErrorResponse>(body)?;
+ let body = serde_json::from_str::<models::ErrorResponse>(body).map_err(|e| {
+ ApiError(format!("Response body did not match the schema: {}", e))
+ })?;
Ok(LookupCreatorResponse::BadRequest(body))
}
404 => {
let body = response.into_body();
let body = body
- .to_raw()
+ .into_raw()
.map_err(|e| ApiError(format!("Failed to read response: {}", e)))
.await?;
let body = str::from_utf8(&body)
.map_err(|e| ApiError(format!("Response was not valid UTF8: {}", e)))?;
- let body = serde_json::from_str::<models::ErrorResponse>(body)?;
+ let body = serde_json::from_str::<models::ErrorResponse>(body).map_err(|e| {
+ ApiError(format!("Response body did not match the schema: {}", e))
+ })?;
Ok(LookupCreatorResponse::NotFound(body))
}
500 => {
let body = response.into_body();
let body = body
- .to_raw()
+ .into_raw()
.map_err(|e| ApiError(format!("Failed to read response: {}", e)))
.await?;
let body = str::from_utf8(&body)
.map_err(|e| ApiError(format!("Response was not valid UTF8: {}", e)))?;
- let body = serde_json::from_str::<models::ErrorResponse>(body)?;
+ let body = serde_json::from_str::<models::ErrorResponse>(body).map_err(|e| {
+ ApiError(format!("Response body did not match the schema: {}", e))
+ })?;
Ok(LookupCreatorResponse::GenericError(body))
}
code => {
let headers = response.headers().clone();
- let body = response.into_body().take(100).to_raw().await;
+ let body = response.into_body().take(100).into_raw().await;
Err(ApiError(format!(
"Unexpected response code {}:\n{:?}\n\n{}",
code,
@@ -13934,50 +14761,58 @@ where
200 => {
let body = response.into_body();
let body = body
- .to_raw()
+ .into_raw()
.map_err(|e| ApiError(format!("Failed to read response: {}", e)))
.await?;
let body = str::from_utf8(&body)
.map_err(|e| ApiError(format!("Response was not valid UTF8: {}", e)))?;
- let body = serde_json::from_str::<models::Editor>(body)?;
+ let body = serde_json::from_str::<models::Editor>(body).map_err(|e| {
+ ApiError(format!("Response body did not match the schema: {}", e))
+ })?;
Ok(LookupEditorResponse::Found(body))
}
400 => {
let body = response.into_body();
let body = body
- .to_raw()
+ .into_raw()
.map_err(|e| ApiError(format!("Failed to read response: {}", e)))
.await?;
let body = str::from_utf8(&body)
.map_err(|e| ApiError(format!("Response was not valid UTF8: {}", e)))?;
- let body = serde_json::from_str::<models::ErrorResponse>(body)?;
+ let body = serde_json::from_str::<models::ErrorResponse>(body).map_err(|e| {
+ ApiError(format!("Response body did not match the schema: {}", e))
+ })?;
Ok(LookupEditorResponse::BadRequest(body))
}
404 => {
let body = response.into_body();
let body = body
- .to_raw()
+ .into_raw()
.map_err(|e| ApiError(format!("Failed to read response: {}", e)))
.await?;
let body = str::from_utf8(&body)
.map_err(|e| ApiError(format!("Response was not valid UTF8: {}", e)))?;
- let body = serde_json::from_str::<models::ErrorResponse>(body)?;
+ let body = serde_json::from_str::<models::ErrorResponse>(body).map_err(|e| {
+ ApiError(format!("Response body did not match the schema: {}", e))
+ })?;
Ok(LookupEditorResponse::NotFound(body))
}
500 => {
let body = response.into_body();
let body = body
- .to_raw()
+ .into_raw()
.map_err(|e| ApiError(format!("Failed to read response: {}", e)))
.await?;
let body = str::from_utf8(&body)
.map_err(|e| ApiError(format!("Response was not valid UTF8: {}", e)))?;
- let body = serde_json::from_str::<models::ErrorResponse>(body)?;
+ let body = serde_json::from_str::<models::ErrorResponse>(body).map_err(|e| {
+ ApiError(format!("Response body did not match the schema: {}", e))
+ })?;
Ok(LookupEditorResponse::GenericError(body))
}
code => {
let headers = response.headers().clone();
- let body = response.into_body().take(100).to_raw().await;
+ let body = response.into_body().take(100).into_raw().await;
Err(ApiError(format!(
"Unexpected response code {}:\n{:?}\n\n{}",
code,
@@ -14074,50 +14909,58 @@ where
200 => {
let body = response.into_body();
let body = body
- .to_raw()
+ .into_raw()
.map_err(|e| ApiError(format!("Failed to read response: {}", e)))
.await?;
let body = str::from_utf8(&body)
.map_err(|e| ApiError(format!("Response was not valid UTF8: {}", e)))?;
- let body = serde_json::from_str::<models::FileEntity>(body)?;
+ let body = serde_json::from_str::<models::FileEntity>(body).map_err(|e| {
+ ApiError(format!("Response body did not match the schema: {}", e))
+ })?;
Ok(LookupFileResponse::FoundEntity(body))
}
400 => {
let body = response.into_body();
let body = body
- .to_raw()
+ .into_raw()
.map_err(|e| ApiError(format!("Failed to read response: {}", e)))
.await?;
let body = str::from_utf8(&body)
.map_err(|e| ApiError(format!("Response was not valid UTF8: {}", e)))?;
- let body = serde_json::from_str::<models::ErrorResponse>(body)?;
+ let body = serde_json::from_str::<models::ErrorResponse>(body).map_err(|e| {
+ ApiError(format!("Response body did not match the schema: {}", e))
+ })?;
Ok(LookupFileResponse::BadRequest(body))
}
404 => {
let body = response.into_body();
let body = body
- .to_raw()
+ .into_raw()
.map_err(|e| ApiError(format!("Failed to read response: {}", e)))
.await?;
let body = str::from_utf8(&body)
.map_err(|e| ApiError(format!("Response was not valid UTF8: {}", e)))?;
- let body = serde_json::from_str::<models::ErrorResponse>(body)?;
+ let body = serde_json::from_str::<models::ErrorResponse>(body).map_err(|e| {
+ ApiError(format!("Response body did not match the schema: {}", e))
+ })?;
Ok(LookupFileResponse::NotFound(body))
}
500 => {
let body = response.into_body();
let body = body
- .to_raw()
+ .into_raw()
.map_err(|e| ApiError(format!("Failed to read response: {}", e)))
.await?;
let body = str::from_utf8(&body)
.map_err(|e| ApiError(format!("Response was not valid UTF8: {}", e)))?;
- let body = serde_json::from_str::<models::ErrorResponse>(body)?;
+ let body = serde_json::from_str::<models::ErrorResponse>(body).map_err(|e| {
+ ApiError(format!("Response body did not match the schema: {}", e))
+ })?;
Ok(LookupFileResponse::GenericError(body))
}
code => {
let headers = response.headers().clone();
- let body = response.into_body().take(100).to_raw().await;
+ let body = response.into_body().take(100).into_raw().await;
Err(ApiError(format!(
"Unexpected response code {}:\n{:?}\n\n{}",
code,
@@ -14258,50 +15101,58 @@ where
200 => {
let body = response.into_body();
let body = body
- .to_raw()
+ .into_raw()
.map_err(|e| ApiError(format!("Failed to read response: {}", e)))
.await?;
let body = str::from_utf8(&body)
.map_err(|e| ApiError(format!("Response was not valid UTF8: {}", e)))?;
- let body = serde_json::from_str::<models::ReleaseEntity>(body)?;
+ let body = serde_json::from_str::<models::ReleaseEntity>(body).map_err(|e| {
+ ApiError(format!("Response body did not match the schema: {}", e))
+ })?;
Ok(LookupReleaseResponse::FoundEntity(body))
}
400 => {
let body = response.into_body();
let body = body
- .to_raw()
+ .into_raw()
.map_err(|e| ApiError(format!("Failed to read response: {}", e)))
.await?;
let body = str::from_utf8(&body)
.map_err(|e| ApiError(format!("Response was not valid UTF8: {}", e)))?;
- let body = serde_json::from_str::<models::ErrorResponse>(body)?;
+ let body = serde_json::from_str::<models::ErrorResponse>(body).map_err(|e| {
+ ApiError(format!("Response body did not match the schema: {}", e))
+ })?;
Ok(LookupReleaseResponse::BadRequest(body))
}
404 => {
let body = response.into_body();
let body = body
- .to_raw()
+ .into_raw()
.map_err(|e| ApiError(format!("Failed to read response: {}", e)))
.await?;
let body = str::from_utf8(&body)
.map_err(|e| ApiError(format!("Response was not valid UTF8: {}", e)))?;
- let body = serde_json::from_str::<models::ErrorResponse>(body)?;
+ let body = serde_json::from_str::<models::ErrorResponse>(body).map_err(|e| {
+ ApiError(format!("Response body did not match the schema: {}", e))
+ })?;
Ok(LookupReleaseResponse::NotFound(body))
}
500 => {
let body = response.into_body();
let body = body
- .to_raw()
+ .into_raw()
.map_err(|e| ApiError(format!("Failed to read response: {}", e)))
.await?;
let body = str::from_utf8(&body)
.map_err(|e| ApiError(format!("Response was not valid UTF8: {}", e)))?;
- let body = serde_json::from_str::<models::ErrorResponse>(body)?;
+ let body = serde_json::from_str::<models::ErrorResponse>(body).map_err(|e| {
+ ApiError(format!("Response body did not match the schema: {}", e))
+ })?;
Ok(LookupReleaseResponse::GenericError(body))
}
code => {
let headers = response.headers().clone();
- let body = response.into_body().take(100).to_raw().await;
+ let body = response.into_body().take(100).into_raw().await;
Err(ApiError(format!(
"Unexpected response code {}:\n{:?}\n\n{}",
code,
@@ -14425,23 +15276,27 @@ where
200 => {
let body = response.into_body();
let body = body
- .to_raw()
+ .into_raw()
.map_err(|e| ApiError(format!("Failed to read response: {}", e)))
.await?;
let body = str::from_utf8(&body)
.map_err(|e| ApiError(format!("Response was not valid UTF8: {}", e)))?;
- let body = serde_json::from_str::<models::EntityEdit>(body)?;
+ let body = serde_json::from_str::<models::EntityEdit>(body).map_err(|e| {
+ ApiError(format!("Response body did not match the schema: {}", e))
+ })?;
Ok(UpdateContainerResponse::UpdatedEntity(body))
}
400 => {
let body = response.into_body();
let body = body
- .to_raw()
+ .into_raw()
.map_err(|e| ApiError(format!("Failed to read response: {}", e)))
.await?;
let body = str::from_utf8(&body)
.map_err(|e| ApiError(format!("Response was not valid UTF8: {}", e)))?;
- let body = serde_json::from_str::<models::ErrorResponse>(body)?;
+ let body = serde_json::from_str::<models::ErrorResponse>(body).map_err(|e| {
+ ApiError(format!("Response body did not match the schema: {}", e))
+ })?;
Ok(UpdateContainerResponse::BadRequest(body))
}
401 => {
@@ -14469,12 +15324,14 @@ where
let body = response.into_body();
let body = body
- .to_raw()
+ .into_raw()
.map_err(|e| ApiError(format!("Failed to read response: {}", e)))
.await?;
let body = str::from_utf8(&body)
.map_err(|e| ApiError(format!("Response was not valid UTF8: {}", e)))?;
- let body = serde_json::from_str::<models::ErrorResponse>(body)?;
+ let body = serde_json::from_str::<models::ErrorResponse>(body).map_err(|e| {
+ ApiError(format!("Response body did not match the schema: {}", e))
+ })?;
Ok(UpdateContainerResponse::NotAuthorized {
body: body,
www_authenticate: response_www_authenticate,
@@ -14483,39 +15340,45 @@ where
403 => {
let body = response.into_body();
let body = body
- .to_raw()
+ .into_raw()
.map_err(|e| ApiError(format!("Failed to read response: {}", e)))
.await?;
let body = str::from_utf8(&body)
.map_err(|e| ApiError(format!("Response was not valid UTF8: {}", e)))?;
- let body = serde_json::from_str::<models::ErrorResponse>(body)?;
+ let body = serde_json::from_str::<models::ErrorResponse>(body).map_err(|e| {
+ ApiError(format!("Response body did not match the schema: {}", e))
+ })?;
Ok(UpdateContainerResponse::Forbidden(body))
}
404 => {
let body = response.into_body();
let body = body
- .to_raw()
+ .into_raw()
.map_err(|e| ApiError(format!("Failed to read response: {}", e)))
.await?;
let body = str::from_utf8(&body)
.map_err(|e| ApiError(format!("Response was not valid UTF8: {}", e)))?;
- let body = serde_json::from_str::<models::ErrorResponse>(body)?;
+ let body = serde_json::from_str::<models::ErrorResponse>(body).map_err(|e| {
+ ApiError(format!("Response body did not match the schema: {}", e))
+ })?;
Ok(UpdateContainerResponse::NotFound(body))
}
500 => {
let body = response.into_body();
let body = body
- .to_raw()
+ .into_raw()
.map_err(|e| ApiError(format!("Failed to read response: {}", e)))
.await?;
let body = str::from_utf8(&body)
.map_err(|e| ApiError(format!("Response was not valid UTF8: {}", e)))?;
- let body = serde_json::from_str::<models::ErrorResponse>(body)?;
+ let body = serde_json::from_str::<models::ErrorResponse>(body).map_err(|e| {
+ ApiError(format!("Response body did not match the schema: {}", e))
+ })?;
Ok(UpdateContainerResponse::GenericError(body))
}
code => {
let headers = response.headers().clone();
- let body = response.into_body().take(100).to_raw().await;
+ let body = response.into_body().take(100).into_raw().await;
Err(ApiError(format!(
"Unexpected response code {}:\n{:?}\n\n{}",
code,
@@ -14639,23 +15502,27 @@ where
200 => {
let body = response.into_body();
let body = body
- .to_raw()
+ .into_raw()
.map_err(|e| ApiError(format!("Failed to read response: {}", e)))
.await?;
let body = str::from_utf8(&body)
.map_err(|e| ApiError(format!("Response was not valid UTF8: {}", e)))?;
- let body = serde_json::from_str::<models::EntityEdit>(body)?;
+ let body = serde_json::from_str::<models::EntityEdit>(body).map_err(|e| {
+ ApiError(format!("Response body did not match the schema: {}", e))
+ })?;
Ok(UpdateCreatorResponse::UpdatedEntity(body))
}
400 => {
let body = response.into_body();
let body = body
- .to_raw()
+ .into_raw()
.map_err(|e| ApiError(format!("Failed to read response: {}", e)))
.await?;
let body = str::from_utf8(&body)
.map_err(|e| ApiError(format!("Response was not valid UTF8: {}", e)))?;
- let body = serde_json::from_str::<models::ErrorResponse>(body)?;
+ let body = serde_json::from_str::<models::ErrorResponse>(body).map_err(|e| {
+ ApiError(format!("Response body did not match the schema: {}", e))
+ })?;
Ok(UpdateCreatorResponse::BadRequest(body))
}
401 => {
@@ -14683,12 +15550,14 @@ where
let body = response.into_body();
let body = body
- .to_raw()
+ .into_raw()
.map_err(|e| ApiError(format!("Failed to read response: {}", e)))
.await?;
let body = str::from_utf8(&body)
.map_err(|e| ApiError(format!("Response was not valid UTF8: {}", e)))?;
- let body = serde_json::from_str::<models::ErrorResponse>(body)?;
+ let body = serde_json::from_str::<models::ErrorResponse>(body).map_err(|e| {
+ ApiError(format!("Response body did not match the schema: {}", e))
+ })?;
Ok(UpdateCreatorResponse::NotAuthorized {
body: body,
www_authenticate: response_www_authenticate,
@@ -14697,39 +15566,45 @@ where
403 => {
let body = response.into_body();
let body = body
- .to_raw()
+ .into_raw()
.map_err(|e| ApiError(format!("Failed to read response: {}", e)))
.await?;
let body = str::from_utf8(&body)
.map_err(|e| ApiError(format!("Response was not valid UTF8: {}", e)))?;
- let body = serde_json::from_str::<models::ErrorResponse>(body)?;
+ let body = serde_json::from_str::<models::ErrorResponse>(body).map_err(|e| {
+ ApiError(format!("Response body did not match the schema: {}", e))
+ })?;
Ok(UpdateCreatorResponse::Forbidden(body))
}
404 => {
let body = response.into_body();
let body = body
- .to_raw()
+ .into_raw()
.map_err(|e| ApiError(format!("Failed to read response: {}", e)))
.await?;
let body = str::from_utf8(&body)
.map_err(|e| ApiError(format!("Response was not valid UTF8: {}", e)))?;
- let body = serde_json::from_str::<models::ErrorResponse>(body)?;
+ let body = serde_json::from_str::<models::ErrorResponse>(body).map_err(|e| {
+ ApiError(format!("Response body did not match the schema: {}", e))
+ })?;
Ok(UpdateCreatorResponse::NotFound(body))
}
500 => {
let body = response.into_body();
let body = body
- .to_raw()
+ .into_raw()
.map_err(|e| ApiError(format!("Failed to read response: {}", e)))
.await?;
let body = str::from_utf8(&body)
.map_err(|e| ApiError(format!("Response was not valid UTF8: {}", e)))?;
- let body = serde_json::from_str::<models::ErrorResponse>(body)?;
+ let body = serde_json::from_str::<models::ErrorResponse>(body).map_err(|e| {
+ ApiError(format!("Response body did not match the schema: {}", e))
+ })?;
Ok(UpdateCreatorResponse::GenericError(body))
}
code => {
let headers = response.headers().clone();
- let body = response.into_body().take(100).to_raw().await;
+ let body = response.into_body().take(100).into_raw().await;
Err(ApiError(format!(
"Unexpected response code {}:\n{:?}\n\n{}",
code,
@@ -14855,23 +15730,27 @@ where
200 => {
let body = response.into_body();
let body = body
- .to_raw()
+ .into_raw()
.map_err(|e| ApiError(format!("Failed to read response: {}", e)))
.await?;
let body = str::from_utf8(&body)
.map_err(|e| ApiError(format!("Response was not valid UTF8: {}", e)))?;
- let body = serde_json::from_str::<models::Editgroup>(body)?;
+ let body = serde_json::from_str::<models::Editgroup>(body).map_err(|e| {
+ ApiError(format!("Response body did not match the schema: {}", e))
+ })?;
Ok(UpdateEditgroupResponse::UpdatedEditgroup(body))
}
400 => {
let body = response.into_body();
let body = body
- .to_raw()
+ .into_raw()
.map_err(|e| ApiError(format!("Failed to read response: {}", e)))
.await?;
let body = str::from_utf8(&body)
.map_err(|e| ApiError(format!("Response was not valid UTF8: {}", e)))?;
- let body = serde_json::from_str::<models::ErrorResponse>(body)?;
+ let body = serde_json::from_str::<models::ErrorResponse>(body).map_err(|e| {
+ ApiError(format!("Response body did not match the schema: {}", e))
+ })?;
Ok(UpdateEditgroupResponse::BadRequest(body))
}
401 => {
@@ -14899,12 +15778,14 @@ where
let body = response.into_body();
let body = body
- .to_raw()
+ .into_raw()
.map_err(|e| ApiError(format!("Failed to read response: {}", e)))
.await?;
let body = str::from_utf8(&body)
.map_err(|e| ApiError(format!("Response was not valid UTF8: {}", e)))?;
- let body = serde_json::from_str::<models::ErrorResponse>(body)?;
+ let body = serde_json::from_str::<models::ErrorResponse>(body).map_err(|e| {
+ ApiError(format!("Response body did not match the schema: {}", e))
+ })?;
Ok(UpdateEditgroupResponse::NotAuthorized {
body: body,
www_authenticate: response_www_authenticate,
@@ -14913,39 +15794,45 @@ where
403 => {
let body = response.into_body();
let body = body
- .to_raw()
+ .into_raw()
.map_err(|e| ApiError(format!("Failed to read response: {}", e)))
.await?;
let body = str::from_utf8(&body)
.map_err(|e| ApiError(format!("Response was not valid UTF8: {}", e)))?;
- let body = serde_json::from_str::<models::ErrorResponse>(body)?;
+ let body = serde_json::from_str::<models::ErrorResponse>(body).map_err(|e| {
+ ApiError(format!("Response body did not match the schema: {}", e))
+ })?;
Ok(UpdateEditgroupResponse::Forbidden(body))
}
404 => {
let body = response.into_body();
let body = body
- .to_raw()
+ .into_raw()
.map_err(|e| ApiError(format!("Failed to read response: {}", e)))
.await?;
let body = str::from_utf8(&body)
.map_err(|e| ApiError(format!("Response was not valid UTF8: {}", e)))?;
- let body = serde_json::from_str::<models::ErrorResponse>(body)?;
+ let body = serde_json::from_str::<models::ErrorResponse>(body).map_err(|e| {
+ ApiError(format!("Response body did not match the schema: {}", e))
+ })?;
Ok(UpdateEditgroupResponse::NotFound(body))
}
500 => {
let body = response.into_body();
let body = body
- .to_raw()
+ .into_raw()
.map_err(|e| ApiError(format!("Failed to read response: {}", e)))
.await?;
let body = str::from_utf8(&body)
.map_err(|e| ApiError(format!("Response was not valid UTF8: {}", e)))?;
- let body = serde_json::from_str::<models::ErrorResponse>(body)?;
+ let body = serde_json::from_str::<models::ErrorResponse>(body).map_err(|e| {
+ ApiError(format!("Response body did not match the schema: {}", e))
+ })?;
Ok(UpdateEditgroupResponse::GenericError(body))
}
code => {
let headers = response.headers().clone();
- let body = response.into_body().take(100).to_raw().await;
+ let body = response.into_body().take(100).into_raw().await;
Err(ApiError(format!(
"Unexpected response code {}:\n{:?}\n\n{}",
code,
@@ -15066,23 +15953,27 @@ where
200 => {
let body = response.into_body();
let body = body
- .to_raw()
+ .into_raw()
.map_err(|e| ApiError(format!("Failed to read response: {}", e)))
.await?;
let body = str::from_utf8(&body)
.map_err(|e| ApiError(format!("Response was not valid UTF8: {}", e)))?;
- let body = serde_json::from_str::<models::Editor>(body)?;
+ let body = serde_json::from_str::<models::Editor>(body).map_err(|e| {
+ ApiError(format!("Response body did not match the schema: {}", e))
+ })?;
Ok(UpdateEditorResponse::UpdatedEditor(body))
}
400 => {
let body = response.into_body();
let body = body
- .to_raw()
+ .into_raw()
.map_err(|e| ApiError(format!("Failed to read response: {}", e)))
.await?;
let body = str::from_utf8(&body)
.map_err(|e| ApiError(format!("Response was not valid UTF8: {}", e)))?;
- let body = serde_json::from_str::<models::ErrorResponse>(body)?;
+ let body = serde_json::from_str::<models::ErrorResponse>(body).map_err(|e| {
+ ApiError(format!("Response body did not match the schema: {}", e))
+ })?;
Ok(UpdateEditorResponse::BadRequest(body))
}
401 => {
@@ -15110,12 +16001,14 @@ where
let body = response.into_body();
let body = body
- .to_raw()
+ .into_raw()
.map_err(|e| ApiError(format!("Failed to read response: {}", e)))
.await?;
let body = str::from_utf8(&body)
.map_err(|e| ApiError(format!("Response was not valid UTF8: {}", e)))?;
- let body = serde_json::from_str::<models::ErrorResponse>(body)?;
+ let body = serde_json::from_str::<models::ErrorResponse>(body).map_err(|e| {
+ ApiError(format!("Response body did not match the schema: {}", e))
+ })?;
Ok(UpdateEditorResponse::NotAuthorized {
body: body,
www_authenticate: response_www_authenticate,
@@ -15124,39 +16017,45 @@ where
403 => {
let body = response.into_body();
let body = body
- .to_raw()
+ .into_raw()
.map_err(|e| ApiError(format!("Failed to read response: {}", e)))
.await?;
let body = str::from_utf8(&body)
.map_err(|e| ApiError(format!("Response was not valid UTF8: {}", e)))?;
- let body = serde_json::from_str::<models::ErrorResponse>(body)?;
+ let body = serde_json::from_str::<models::ErrorResponse>(body).map_err(|e| {
+ ApiError(format!("Response body did not match the schema: {}", e))
+ })?;
Ok(UpdateEditorResponse::Forbidden(body))
}
404 => {
let body = response.into_body();
let body = body
- .to_raw()
+ .into_raw()
.map_err(|e| ApiError(format!("Failed to read response: {}", e)))
.await?;
let body = str::from_utf8(&body)
.map_err(|e| ApiError(format!("Response was not valid UTF8: {}", e)))?;
- let body = serde_json::from_str::<models::ErrorResponse>(body)?;
+ let body = serde_json::from_str::<models::ErrorResponse>(body).map_err(|e| {
+ ApiError(format!("Response body did not match the schema: {}", e))
+ })?;
Ok(UpdateEditorResponse::NotFound(body))
}
500 => {
let body = response.into_body();
let body = body
- .to_raw()
+ .into_raw()
.map_err(|e| ApiError(format!("Failed to read response: {}", e)))
.await?;
let body = str::from_utf8(&body)
.map_err(|e| ApiError(format!("Response was not valid UTF8: {}", e)))?;
- let body = serde_json::from_str::<models::ErrorResponse>(body)?;
+ let body = serde_json::from_str::<models::ErrorResponse>(body).map_err(|e| {
+ ApiError(format!("Response body did not match the schema: {}", e))
+ })?;
Ok(UpdateEditorResponse::GenericError(body))
}
code => {
let headers = response.headers().clone();
- let body = response.into_body().take(100).to_raw().await;
+ let body = response.into_body().take(100).into_raw().await;
Err(ApiError(format!(
"Unexpected response code {}:\n{:?}\n\n{}",
code,
@@ -15280,23 +16179,27 @@ where
200 => {
let body = response.into_body();
let body = body
- .to_raw()
+ .into_raw()
.map_err(|e| ApiError(format!("Failed to read response: {}", e)))
.await?;
let body = str::from_utf8(&body)
.map_err(|e| ApiError(format!("Response was not valid UTF8: {}", e)))?;
- let body = serde_json::from_str::<models::EntityEdit>(body)?;
+ let body = serde_json::from_str::<models::EntityEdit>(body).map_err(|e| {
+ ApiError(format!("Response body did not match the schema: {}", e))
+ })?;
Ok(UpdateFileResponse::UpdatedEntity(body))
}
400 => {
let body = response.into_body();
let body = body
- .to_raw()
+ .into_raw()
.map_err(|e| ApiError(format!("Failed to read response: {}", e)))
.await?;
let body = str::from_utf8(&body)
.map_err(|e| ApiError(format!("Response was not valid UTF8: {}", e)))?;
- let body = serde_json::from_str::<models::ErrorResponse>(body)?;
+ let body = serde_json::from_str::<models::ErrorResponse>(body).map_err(|e| {
+ ApiError(format!("Response body did not match the schema: {}", e))
+ })?;
Ok(UpdateFileResponse::BadRequest(body))
}
401 => {
@@ -15324,12 +16227,14 @@ where
let body = response.into_body();
let body = body
- .to_raw()
+ .into_raw()
.map_err(|e| ApiError(format!("Failed to read response: {}", e)))
.await?;
let body = str::from_utf8(&body)
.map_err(|e| ApiError(format!("Response was not valid UTF8: {}", e)))?;
- let body = serde_json::from_str::<models::ErrorResponse>(body)?;
+ let body = serde_json::from_str::<models::ErrorResponse>(body).map_err(|e| {
+ ApiError(format!("Response body did not match the schema: {}", e))
+ })?;
Ok(UpdateFileResponse::NotAuthorized {
body: body,
www_authenticate: response_www_authenticate,
@@ -15338,39 +16243,45 @@ where
403 => {
let body = response.into_body();
let body = body
- .to_raw()
+ .into_raw()
.map_err(|e| ApiError(format!("Failed to read response: {}", e)))
.await?;
let body = str::from_utf8(&body)
.map_err(|e| ApiError(format!("Response was not valid UTF8: {}", e)))?;
- let body = serde_json::from_str::<models::ErrorResponse>(body)?;
+ let body = serde_json::from_str::<models::ErrorResponse>(body).map_err(|e| {
+ ApiError(format!("Response body did not match the schema: {}", e))
+ })?;
Ok(UpdateFileResponse::Forbidden(body))
}
404 => {
let body = response.into_body();
let body = body
- .to_raw()
+ .into_raw()
.map_err(|e| ApiError(format!("Failed to read response: {}", e)))
.await?;
let body = str::from_utf8(&body)
.map_err(|e| ApiError(format!("Response was not valid UTF8: {}", e)))?;
- let body = serde_json::from_str::<models::ErrorResponse>(body)?;
+ let body = serde_json::from_str::<models::ErrorResponse>(body).map_err(|e| {
+ ApiError(format!("Response body did not match the schema: {}", e))
+ })?;
Ok(UpdateFileResponse::NotFound(body))
}
500 => {
let body = response.into_body();
let body = body
- .to_raw()
+ .into_raw()
.map_err(|e| ApiError(format!("Failed to read response: {}", e)))
.await?;
let body = str::from_utf8(&body)
.map_err(|e| ApiError(format!("Response was not valid UTF8: {}", e)))?;
- let body = serde_json::from_str::<models::ErrorResponse>(body)?;
+ let body = serde_json::from_str::<models::ErrorResponse>(body).map_err(|e| {
+ ApiError(format!("Response body did not match the schema: {}", e))
+ })?;
Ok(UpdateFileResponse::GenericError(body))
}
code => {
let headers = response.headers().clone();
- let body = response.into_body().take(100).to_raw().await;
+ let body = response.into_body().take(100).into_raw().await;
Err(ApiError(format!(
"Unexpected response code {}:\n{:?}\n\n{}",
code,
@@ -15494,23 +16405,27 @@ where
200 => {
let body = response.into_body();
let body = body
- .to_raw()
+ .into_raw()
.map_err(|e| ApiError(format!("Failed to read response: {}", e)))
.await?;
let body = str::from_utf8(&body)
.map_err(|e| ApiError(format!("Response was not valid UTF8: {}", e)))?;
- let body = serde_json::from_str::<models::EntityEdit>(body)?;
+ let body = serde_json::from_str::<models::EntityEdit>(body).map_err(|e| {
+ ApiError(format!("Response body did not match the schema: {}", e))
+ })?;
Ok(UpdateFilesetResponse::UpdatedEntity(body))
}
400 => {
let body = response.into_body();
let body = body
- .to_raw()
+ .into_raw()
.map_err(|e| ApiError(format!("Failed to read response: {}", e)))
.await?;
let body = str::from_utf8(&body)
.map_err(|e| ApiError(format!("Response was not valid UTF8: {}", e)))?;
- let body = serde_json::from_str::<models::ErrorResponse>(body)?;
+ let body = serde_json::from_str::<models::ErrorResponse>(body).map_err(|e| {
+ ApiError(format!("Response body did not match the schema: {}", e))
+ })?;
Ok(UpdateFilesetResponse::BadRequest(body))
}
401 => {
@@ -15538,12 +16453,14 @@ where
let body = response.into_body();
let body = body
- .to_raw()
+ .into_raw()
.map_err(|e| ApiError(format!("Failed to read response: {}", e)))
.await?;
let body = str::from_utf8(&body)
.map_err(|e| ApiError(format!("Response was not valid UTF8: {}", e)))?;
- let body = serde_json::from_str::<models::ErrorResponse>(body)?;
+ let body = serde_json::from_str::<models::ErrorResponse>(body).map_err(|e| {
+ ApiError(format!("Response body did not match the schema: {}", e))
+ })?;
Ok(UpdateFilesetResponse::NotAuthorized {
body: body,
www_authenticate: response_www_authenticate,
@@ -15552,39 +16469,45 @@ where
403 => {
let body = response.into_body();
let body = body
- .to_raw()
+ .into_raw()
.map_err(|e| ApiError(format!("Failed to read response: {}", e)))
.await?;
let body = str::from_utf8(&body)
.map_err(|e| ApiError(format!("Response was not valid UTF8: {}", e)))?;
- let body = serde_json::from_str::<models::ErrorResponse>(body)?;
+ let body = serde_json::from_str::<models::ErrorResponse>(body).map_err(|e| {
+ ApiError(format!("Response body did not match the schema: {}", e))
+ })?;
Ok(UpdateFilesetResponse::Forbidden(body))
}
404 => {
let body = response.into_body();
let body = body
- .to_raw()
+ .into_raw()
.map_err(|e| ApiError(format!("Failed to read response: {}", e)))
.await?;
let body = str::from_utf8(&body)
.map_err(|e| ApiError(format!("Response was not valid UTF8: {}", e)))?;
- let body = serde_json::from_str::<models::ErrorResponse>(body)?;
+ let body = serde_json::from_str::<models::ErrorResponse>(body).map_err(|e| {
+ ApiError(format!("Response body did not match the schema: {}", e))
+ })?;
Ok(UpdateFilesetResponse::NotFound(body))
}
500 => {
let body = response.into_body();
let body = body
- .to_raw()
+ .into_raw()
.map_err(|e| ApiError(format!("Failed to read response: {}", e)))
.await?;
let body = str::from_utf8(&body)
.map_err(|e| ApiError(format!("Response was not valid UTF8: {}", e)))?;
- let body = serde_json::from_str::<models::ErrorResponse>(body)?;
+ let body = serde_json::from_str::<models::ErrorResponse>(body).map_err(|e| {
+ ApiError(format!("Response body did not match the schema: {}", e))
+ })?;
Ok(UpdateFilesetResponse::GenericError(body))
}
code => {
let headers = response.headers().clone();
- let body = response.into_body().take(100).to_raw().await;
+ let body = response.into_body().take(100).into_raw().await;
Err(ApiError(format!(
"Unexpected response code {}:\n{:?}\n\n{}",
code,
@@ -15708,23 +16631,27 @@ where
200 => {
let body = response.into_body();
let body = body
- .to_raw()
+ .into_raw()
.map_err(|e| ApiError(format!("Failed to read response: {}", e)))
.await?;
let body = str::from_utf8(&body)
.map_err(|e| ApiError(format!("Response was not valid UTF8: {}", e)))?;
- let body = serde_json::from_str::<models::EntityEdit>(body)?;
+ let body = serde_json::from_str::<models::EntityEdit>(body).map_err(|e| {
+ ApiError(format!("Response body did not match the schema: {}", e))
+ })?;
Ok(UpdateReleaseResponse::UpdatedEntity(body))
}
400 => {
let body = response.into_body();
let body = body
- .to_raw()
+ .into_raw()
.map_err(|e| ApiError(format!("Failed to read response: {}", e)))
.await?;
let body = str::from_utf8(&body)
.map_err(|e| ApiError(format!("Response was not valid UTF8: {}", e)))?;
- let body = serde_json::from_str::<models::ErrorResponse>(body)?;
+ let body = serde_json::from_str::<models::ErrorResponse>(body).map_err(|e| {
+ ApiError(format!("Response body did not match the schema: {}", e))
+ })?;
Ok(UpdateReleaseResponse::BadRequest(body))
}
401 => {
@@ -15752,12 +16679,14 @@ where
let body = response.into_body();
let body = body
- .to_raw()
+ .into_raw()
.map_err(|e| ApiError(format!("Failed to read response: {}", e)))
.await?;
let body = str::from_utf8(&body)
.map_err(|e| ApiError(format!("Response was not valid UTF8: {}", e)))?;
- let body = serde_json::from_str::<models::ErrorResponse>(body)?;
+ let body = serde_json::from_str::<models::ErrorResponse>(body).map_err(|e| {
+ ApiError(format!("Response body did not match the schema: {}", e))
+ })?;
Ok(UpdateReleaseResponse::NotAuthorized {
body: body,
www_authenticate: response_www_authenticate,
@@ -15766,39 +16695,45 @@ where
403 => {
let body = response.into_body();
let body = body
- .to_raw()
+ .into_raw()
.map_err(|e| ApiError(format!("Failed to read response: {}", e)))
.await?;
let body = str::from_utf8(&body)
.map_err(|e| ApiError(format!("Response was not valid UTF8: {}", e)))?;
- let body = serde_json::from_str::<models::ErrorResponse>(body)?;
+ let body = serde_json::from_str::<models::ErrorResponse>(body).map_err(|e| {
+ ApiError(format!("Response body did not match the schema: {}", e))
+ })?;
Ok(UpdateReleaseResponse::Forbidden(body))
}
404 => {
let body = response.into_body();
let body = body
- .to_raw()
+ .into_raw()
.map_err(|e| ApiError(format!("Failed to read response: {}", e)))
.await?;
let body = str::from_utf8(&body)
.map_err(|e| ApiError(format!("Response was not valid UTF8: {}", e)))?;
- let body = serde_json::from_str::<models::ErrorResponse>(body)?;
+ let body = serde_json::from_str::<models::ErrorResponse>(body).map_err(|e| {
+ ApiError(format!("Response body did not match the schema: {}", e))
+ })?;
Ok(UpdateReleaseResponse::NotFound(body))
}
500 => {
let body = response.into_body();
let body = body
- .to_raw()
+ .into_raw()
.map_err(|e| ApiError(format!("Failed to read response: {}", e)))
.await?;
let body = str::from_utf8(&body)
.map_err(|e| ApiError(format!("Response was not valid UTF8: {}", e)))?;
- let body = serde_json::from_str::<models::ErrorResponse>(body)?;
+ let body = serde_json::from_str::<models::ErrorResponse>(body).map_err(|e| {
+ ApiError(format!("Response body did not match the schema: {}", e))
+ })?;
Ok(UpdateReleaseResponse::GenericError(body))
}
code => {
let headers = response.headers().clone();
- let body = response.into_body().take(100).to_raw().await;
+ let body = response.into_body().take(100).into_raw().await;
Err(ApiError(format!(
"Unexpected response code {}:\n{:?}\n\n{}",
code,
@@ -15922,23 +16857,27 @@ where
200 => {
let body = response.into_body();
let body = body
- .to_raw()
+ .into_raw()
.map_err(|e| ApiError(format!("Failed to read response: {}", e)))
.await?;
let body = str::from_utf8(&body)
.map_err(|e| ApiError(format!("Response was not valid UTF8: {}", e)))?;
- let body = serde_json::from_str::<models::EntityEdit>(body)?;
+ let body = serde_json::from_str::<models::EntityEdit>(body).map_err(|e| {
+ ApiError(format!("Response body did not match the schema: {}", e))
+ })?;
Ok(UpdateWebcaptureResponse::UpdatedEntity(body))
}
400 => {
let body = response.into_body();
let body = body
- .to_raw()
+ .into_raw()
.map_err(|e| ApiError(format!("Failed to read response: {}", e)))
.await?;
let body = str::from_utf8(&body)
.map_err(|e| ApiError(format!("Response was not valid UTF8: {}", e)))?;
- let body = serde_json::from_str::<models::ErrorResponse>(body)?;
+ let body = serde_json::from_str::<models::ErrorResponse>(body).map_err(|e| {
+ ApiError(format!("Response body did not match the schema: {}", e))
+ })?;
Ok(UpdateWebcaptureResponse::BadRequest(body))
}
401 => {
@@ -15966,12 +16905,14 @@ where
let body = response.into_body();
let body = body
- .to_raw()
+ .into_raw()
.map_err(|e| ApiError(format!("Failed to read response: {}", e)))
.await?;
let body = str::from_utf8(&body)
.map_err(|e| ApiError(format!("Response was not valid UTF8: {}", e)))?;
- let body = serde_json::from_str::<models::ErrorResponse>(body)?;
+ let body = serde_json::from_str::<models::ErrorResponse>(body).map_err(|e| {
+ ApiError(format!("Response body did not match the schema: {}", e))
+ })?;
Ok(UpdateWebcaptureResponse::NotAuthorized {
body: body,
www_authenticate: response_www_authenticate,
@@ -15980,39 +16921,45 @@ where
403 => {
let body = response.into_body();
let body = body
- .to_raw()
+ .into_raw()
.map_err(|e| ApiError(format!("Failed to read response: {}", e)))
.await?;
let body = str::from_utf8(&body)
.map_err(|e| ApiError(format!("Response was not valid UTF8: {}", e)))?;
- let body = serde_json::from_str::<models::ErrorResponse>(body)?;
+ let body = serde_json::from_str::<models::ErrorResponse>(body).map_err(|e| {
+ ApiError(format!("Response body did not match the schema: {}", e))
+ })?;
Ok(UpdateWebcaptureResponse::Forbidden(body))
}
404 => {
let body = response.into_body();
let body = body
- .to_raw()
+ .into_raw()
.map_err(|e| ApiError(format!("Failed to read response: {}", e)))
.await?;
let body = str::from_utf8(&body)
.map_err(|e| ApiError(format!("Response was not valid UTF8: {}", e)))?;
- let body = serde_json::from_str::<models::ErrorResponse>(body)?;
+ let body = serde_json::from_str::<models::ErrorResponse>(body).map_err(|e| {
+ ApiError(format!("Response body did not match the schema: {}", e))
+ })?;
Ok(UpdateWebcaptureResponse::NotFound(body))
}
500 => {
let body = response.into_body();
let body = body
- .to_raw()
+ .into_raw()
.map_err(|e| ApiError(format!("Failed to read response: {}", e)))
.await?;
let body = str::from_utf8(&body)
.map_err(|e| ApiError(format!("Response was not valid UTF8: {}", e)))?;
- let body = serde_json::from_str::<models::ErrorResponse>(body)?;
+ let body = serde_json::from_str::<models::ErrorResponse>(body).map_err(|e| {
+ ApiError(format!("Response body did not match the schema: {}", e))
+ })?;
Ok(UpdateWebcaptureResponse::GenericError(body))
}
code => {
let headers = response.headers().clone();
- let body = response.into_body().take(100).to_raw().await;
+ let body = response.into_body().take(100).into_raw().await;
Err(ApiError(format!(
"Unexpected response code {}:\n{:?}\n\n{}",
code,
@@ -16138,23 +17085,27 @@ where
200 => {
let body = response.into_body();
let body = body
- .to_raw()
+ .into_raw()
.map_err(|e| ApiError(format!("Failed to read response: {}", e)))
.await?;
let body = str::from_utf8(&body)
.map_err(|e| ApiError(format!("Response was not valid UTF8: {}", e)))?;
- let body = serde_json::from_str::<models::EntityEdit>(body)?;
+ let body = serde_json::from_str::<models::EntityEdit>(body).map_err(|e| {
+ ApiError(format!("Response body did not match the schema: {}", e))
+ })?;
Ok(UpdateWorkResponse::UpdatedEntity(body))
}
400 => {
let body = response.into_body();
let body = body
- .to_raw()
+ .into_raw()
.map_err(|e| ApiError(format!("Failed to read response: {}", e)))
.await?;
let body = str::from_utf8(&body)
.map_err(|e| ApiError(format!("Response was not valid UTF8: {}", e)))?;
- let body = serde_json::from_str::<models::ErrorResponse>(body)?;
+ let body = serde_json::from_str::<models::ErrorResponse>(body).map_err(|e| {
+ ApiError(format!("Response body did not match the schema: {}", e))
+ })?;
Ok(UpdateWorkResponse::BadRequest(body))
}
401 => {
@@ -16182,12 +17133,14 @@ where
let body = response.into_body();
let body = body
- .to_raw()
+ .into_raw()
.map_err(|e| ApiError(format!("Failed to read response: {}", e)))
.await?;
let body = str::from_utf8(&body)
.map_err(|e| ApiError(format!("Response was not valid UTF8: {}", e)))?;
- let body = serde_json::from_str::<models::ErrorResponse>(body)?;
+ let body = serde_json::from_str::<models::ErrorResponse>(body).map_err(|e| {
+ ApiError(format!("Response body did not match the schema: {}", e))
+ })?;
Ok(UpdateWorkResponse::NotAuthorized {
body: body,
www_authenticate: response_www_authenticate,
@@ -16196,39 +17149,45 @@ where
403 => {
let body = response.into_body();
let body = body
- .to_raw()
+ .into_raw()
.map_err(|e| ApiError(format!("Failed to read response: {}", e)))
.await?;
let body = str::from_utf8(&body)
.map_err(|e| ApiError(format!("Response was not valid UTF8: {}", e)))?;
- let body = serde_json::from_str::<models::ErrorResponse>(body)?;
+ let body = serde_json::from_str::<models::ErrorResponse>(body).map_err(|e| {
+ ApiError(format!("Response body did not match the schema: {}", e))
+ })?;
Ok(UpdateWorkResponse::Forbidden(body))
}
404 => {
let body = response.into_body();
let body = body
- .to_raw()
+ .into_raw()
.map_err(|e| ApiError(format!("Failed to read response: {}", e)))
.await?;
let body = str::from_utf8(&body)
.map_err(|e| ApiError(format!("Response was not valid UTF8: {}", e)))?;
- let body = serde_json::from_str::<models::ErrorResponse>(body)?;
+ let body = serde_json::from_str::<models::ErrorResponse>(body).map_err(|e| {
+ ApiError(format!("Response body did not match the schema: {}", e))
+ })?;
Ok(UpdateWorkResponse::NotFound(body))
}
500 => {
let body = response.into_body();
let body = body
- .to_raw()
+ .into_raw()
.map_err(|e| ApiError(format!("Failed to read response: {}", e)))
.await?;
let body = str::from_utf8(&body)
.map_err(|e| ApiError(format!("Response was not valid UTF8: {}", e)))?;
- let body = serde_json::from_str::<models::ErrorResponse>(body)?;
+ let body = serde_json::from_str::<models::ErrorResponse>(body).map_err(|e| {
+ ApiError(format!("Response body did not match the schema: {}", e))
+ })?;
Ok(UpdateWorkResponse::GenericError(body))
}
code => {
let headers = response.headers().clone();
- let body = response.into_body().take(100).to_raw().await;
+ let body = response.into_body().take(100).into_raw().await;
Err(ApiError(format!(
"Unexpected response code {}:\n{:?}\n\n{}",
code,
diff --git a/fatcat-openapi/src/context.rs b/fatcat-openapi/src/context.rs
index d782855..33702b8 100644
--- a/fatcat-openapi/src/context.rs
+++ b/fatcat-openapi/src/context.rs
@@ -102,9 +102,9 @@ where
{
use std::ops::Deref;
- use swagger::auth::Basic;
- if let Some(basic) = swagger::auth::from_headers::<Basic>(&headers) {
- let auth_data = AuthData::Basic(basic);
+ use swagger::auth::Bearer;
+ if let Some(bearer) = swagger::auth::from_headers::<Bearer>(&headers) {
+ let auth_data = AuthData::Bearer(bearer);
let context = context.push(Some(auth_data));
let context = context.push(None::<Authorization>);
diff --git a/fatcat-openapi/src/lib.rs b/fatcat-openapi/src/lib.rs
index 42b1b8c..9af7267 100644
--- a/fatcat-openapi/src/lib.rs
+++ b/fatcat-openapi/src/lib.rs
@@ -10,6 +10,7 @@
use async_trait::async_trait;
use futures::Stream;
+use serde::{Deserialize, Serialize};
use std::error::Error;
use std::task::{Context, Poll};
use swagger::{ApiError, ContextWrapper};
@@ -19,7 +20,7 @@ type ServiceError = Box<dyn Error + Send + Sync + 'static>;
pub const BASE_PATH: &'static str = "/v0";
pub const API_VERSION: &'static str = "0.5.0";
-#[derive(Debug, PartialEq)]
+#[derive(Debug, PartialEq, Serialize, Deserialize)]
#[must_use]
pub enum AcceptEditgroupResponse {
/// Merged Successfully
@@ -41,7 +42,7 @@ pub enum AcceptEditgroupResponse {
GenericError(models::ErrorResponse),
}
-#[derive(Debug, PartialEq)]
+#[derive(Debug, PartialEq, Serialize, Deserialize)]
#[must_use]
pub enum AuthCheckResponse {
/// Success
@@ -59,7 +60,7 @@ pub enum AuthCheckResponse {
GenericError(models::ErrorResponse),
}
-#[derive(Debug, PartialEq)]
+#[derive(Debug, PartialEq, Serialize, Deserialize)]
#[must_use]
pub enum AuthOidcResponse {
/// Found
@@ -81,7 +82,7 @@ pub enum AuthOidcResponse {
GenericError(models::ErrorResponse),
}
-#[derive(Debug, PartialEq)]
+#[derive(Debug, PartialEq, Serialize, Deserialize)]
#[must_use]
pub enum CreateAuthTokenResponse {
/// Success
@@ -99,7 +100,7 @@ pub enum CreateAuthTokenResponse {
GenericError(models::ErrorResponse),
}
-#[derive(Debug, PartialEq)]
+#[derive(Debug, PartialEq, Serialize, Deserialize)]
#[must_use]
pub enum CreateContainerResponse {
/// Created Entity
@@ -119,7 +120,7 @@ pub enum CreateContainerResponse {
GenericError(models::ErrorResponse),
}
-#[derive(Debug, PartialEq)]
+#[derive(Debug, PartialEq, Serialize, Deserialize)]
#[must_use]
pub enum CreateContainerAutoBatchResponse {
/// Created Editgroup
@@ -139,7 +140,7 @@ pub enum CreateContainerAutoBatchResponse {
GenericError(models::ErrorResponse),
}
-#[derive(Debug, PartialEq)]
+#[derive(Debug, PartialEq, Serialize, Deserialize)]
#[must_use]
pub enum CreateCreatorResponse {
/// Created Entity
@@ -159,7 +160,7 @@ pub enum CreateCreatorResponse {
GenericError(models::ErrorResponse),
}
-#[derive(Debug, PartialEq)]
+#[derive(Debug, PartialEq, Serialize, Deserialize)]
#[must_use]
pub enum CreateCreatorAutoBatchResponse {
/// Created Editgroup
@@ -179,7 +180,7 @@ pub enum CreateCreatorAutoBatchResponse {
GenericError(models::ErrorResponse),
}
-#[derive(Debug, PartialEq)]
+#[derive(Debug, PartialEq, Serialize, Deserialize)]
#[must_use]
pub enum CreateEditgroupResponse {
/// Successfully Created
@@ -199,7 +200,7 @@ pub enum CreateEditgroupResponse {
GenericError(models::ErrorResponse),
}
-#[derive(Debug, PartialEq)]
+#[derive(Debug, PartialEq, Serialize, Deserialize)]
#[must_use]
pub enum CreateEditgroupAnnotationResponse {
/// Created
@@ -219,7 +220,7 @@ pub enum CreateEditgroupAnnotationResponse {
GenericError(models::ErrorResponse),
}
-#[derive(Debug, PartialEq)]
+#[derive(Debug, PartialEq, Serialize, Deserialize)]
#[must_use]
pub enum CreateFileResponse {
/// Created Entity
@@ -239,7 +240,7 @@ pub enum CreateFileResponse {
GenericError(models::ErrorResponse),
}
-#[derive(Debug, PartialEq)]
+#[derive(Debug, PartialEq, Serialize, Deserialize)]
#[must_use]
pub enum CreateFileAutoBatchResponse {
/// Created Editgroup
@@ -259,7 +260,7 @@ pub enum CreateFileAutoBatchResponse {
GenericError(models::ErrorResponse),
}
-#[derive(Debug, PartialEq)]
+#[derive(Debug, PartialEq, Serialize, Deserialize)]
#[must_use]
pub enum CreateFilesetResponse {
/// Created Entity
@@ -279,7 +280,7 @@ pub enum CreateFilesetResponse {
GenericError(models::ErrorResponse),
}
-#[derive(Debug, PartialEq)]
+#[derive(Debug, PartialEq, Serialize, Deserialize)]
#[must_use]
pub enum CreateFilesetAutoBatchResponse {
/// Created Editgroup
@@ -299,7 +300,7 @@ pub enum CreateFilesetAutoBatchResponse {
GenericError(models::ErrorResponse),
}
-#[derive(Debug, PartialEq)]
+#[derive(Debug, PartialEq, Serialize, Deserialize)]
#[must_use]
pub enum CreateReleaseResponse {
/// Created Entity
@@ -319,7 +320,7 @@ pub enum CreateReleaseResponse {
GenericError(models::ErrorResponse),
}
-#[derive(Debug, PartialEq)]
+#[derive(Debug, PartialEq, Serialize, Deserialize)]
#[must_use]
pub enum CreateReleaseAutoBatchResponse {
/// Created Editgroup
@@ -339,7 +340,7 @@ pub enum CreateReleaseAutoBatchResponse {
GenericError(models::ErrorResponse),
}
-#[derive(Debug, PartialEq)]
+#[derive(Debug, PartialEq, Serialize, Deserialize)]
#[must_use]
pub enum CreateWebcaptureResponse {
/// Created Entity
@@ -359,7 +360,7 @@ pub enum CreateWebcaptureResponse {
GenericError(models::ErrorResponse),
}
-#[derive(Debug, PartialEq)]
+#[derive(Debug, PartialEq, Serialize, Deserialize)]
#[must_use]
pub enum CreateWebcaptureAutoBatchResponse {
/// Created Editgroup
@@ -379,7 +380,7 @@ pub enum CreateWebcaptureAutoBatchResponse {
GenericError(models::ErrorResponse),
}
-#[derive(Debug, PartialEq)]
+#[derive(Debug, PartialEq, Serialize, Deserialize)]
#[must_use]
pub enum CreateWorkResponse {
/// Created Entity
@@ -399,7 +400,7 @@ pub enum CreateWorkResponse {
GenericError(models::ErrorResponse),
}
-#[derive(Debug, PartialEq)]
+#[derive(Debug, PartialEq, Serialize, Deserialize)]
#[must_use]
pub enum CreateWorkAutoBatchResponse {
/// Created Editgroup
@@ -419,7 +420,7 @@ pub enum CreateWorkAutoBatchResponse {
GenericError(models::ErrorResponse),
}
-#[derive(Debug, PartialEq)]
+#[derive(Debug, PartialEq, Serialize, Deserialize)]
#[must_use]
pub enum DeleteContainerResponse {
/// Deleted Entity
@@ -439,7 +440,7 @@ pub enum DeleteContainerResponse {
GenericError(models::ErrorResponse),
}
-#[derive(Debug, PartialEq)]
+#[derive(Debug, PartialEq, Serialize, Deserialize)]
#[must_use]
pub enum DeleteContainerEditResponse {
/// Deleted Edit
@@ -459,7 +460,7 @@ pub enum DeleteContainerEditResponse {
GenericError(models::ErrorResponse),
}
-#[derive(Debug, PartialEq)]
+#[derive(Debug, PartialEq, Serialize, Deserialize)]
#[must_use]
pub enum DeleteCreatorResponse {
/// Deleted Entity
@@ -479,7 +480,7 @@ pub enum DeleteCreatorResponse {
GenericError(models::ErrorResponse),
}
-#[derive(Debug, PartialEq)]
+#[derive(Debug, PartialEq, Serialize, Deserialize)]
#[must_use]
pub enum DeleteCreatorEditResponse {
/// Deleted Edit
@@ -499,7 +500,7 @@ pub enum DeleteCreatorEditResponse {
GenericError(models::ErrorResponse),
}
-#[derive(Debug, PartialEq)]
+#[derive(Debug, PartialEq, Serialize, Deserialize)]
#[must_use]
pub enum DeleteFileResponse {
/// Deleted Entity
@@ -519,7 +520,7 @@ pub enum DeleteFileResponse {
GenericError(models::ErrorResponse),
}
-#[derive(Debug, PartialEq)]
+#[derive(Debug, PartialEq, Serialize, Deserialize)]
#[must_use]
pub enum DeleteFileEditResponse {
/// Deleted Edit
@@ -539,7 +540,7 @@ pub enum DeleteFileEditResponse {
GenericError(models::ErrorResponse),
}
-#[derive(Debug, PartialEq)]
+#[derive(Debug, PartialEq, Serialize, Deserialize)]
#[must_use]
pub enum DeleteFilesetResponse {
/// Deleted Entity
@@ -559,7 +560,7 @@ pub enum DeleteFilesetResponse {
GenericError(models::ErrorResponse),
}
-#[derive(Debug, PartialEq)]
+#[derive(Debug, PartialEq, Serialize, Deserialize)]
#[must_use]
pub enum DeleteFilesetEditResponse {
/// Deleted Edit
@@ -579,7 +580,7 @@ pub enum DeleteFilesetEditResponse {
GenericError(models::ErrorResponse),
}
-#[derive(Debug, PartialEq)]
+#[derive(Debug, PartialEq, Serialize, Deserialize)]
#[must_use]
pub enum DeleteReleaseResponse {
/// Deleted Entity
@@ -599,7 +600,7 @@ pub enum DeleteReleaseResponse {
GenericError(models::ErrorResponse),
}
-#[derive(Debug, PartialEq)]
+#[derive(Debug, PartialEq, Serialize, Deserialize)]
#[must_use]
pub enum DeleteReleaseEditResponse {
/// Deleted Edit
@@ -619,7 +620,7 @@ pub enum DeleteReleaseEditResponse {
GenericError(models::ErrorResponse),
}
-#[derive(Debug, PartialEq)]
+#[derive(Debug, PartialEq, Serialize, Deserialize)]
#[must_use]
pub enum DeleteWebcaptureResponse {
/// Deleted Entity
@@ -639,7 +640,7 @@ pub enum DeleteWebcaptureResponse {
GenericError(models::ErrorResponse),
}
-#[derive(Debug, PartialEq)]
+#[derive(Debug, PartialEq, Serialize, Deserialize)]
#[must_use]
pub enum DeleteWebcaptureEditResponse {
/// Deleted Edit
@@ -659,7 +660,7 @@ pub enum DeleteWebcaptureEditResponse {
GenericError(models::ErrorResponse),
}
-#[derive(Debug, PartialEq)]
+#[derive(Debug, PartialEq, Serialize, Deserialize)]
#[must_use]
pub enum DeleteWorkResponse {
/// Deleted Entity
@@ -679,7 +680,7 @@ pub enum DeleteWorkResponse {
GenericError(models::ErrorResponse),
}
-#[derive(Debug, PartialEq)]
+#[derive(Debug, PartialEq, Serialize, Deserialize)]
#[must_use]
pub enum DeleteWorkEditResponse {
/// Deleted Edit
@@ -699,7 +700,7 @@ pub enum DeleteWorkEditResponse {
GenericError(models::ErrorResponse),
}
-#[derive(Debug, PartialEq)]
+#[derive(Debug, PartialEq, Serialize, Deserialize)]
#[must_use]
pub enum GetChangelogResponse {
/// Success
@@ -710,7 +711,7 @@ pub enum GetChangelogResponse {
GenericError(models::ErrorResponse),
}
-#[derive(Debug, PartialEq)]
+#[derive(Debug, PartialEq, Serialize, Deserialize)]
#[must_use]
pub enum GetChangelogEntryResponse {
/// Found Changelog Entry
@@ -723,7 +724,7 @@ pub enum GetChangelogEntryResponse {
GenericError(models::ErrorResponse),
}
-#[derive(Debug, PartialEq)]
+#[derive(Debug, PartialEq, Serialize, Deserialize)]
#[must_use]
pub enum GetContainerResponse {
/// Found Entity
@@ -736,7 +737,7 @@ pub enum GetContainerResponse {
GenericError(models::ErrorResponse),
}
-#[derive(Debug, PartialEq)]
+#[derive(Debug, PartialEq, Serialize, Deserialize)]
#[must_use]
pub enum GetContainerEditResponse {
/// Found Edit
@@ -749,7 +750,7 @@ pub enum GetContainerEditResponse {
GenericError(models::ErrorResponse),
}
-#[derive(Debug, PartialEq)]
+#[derive(Debug, PartialEq, Serialize, Deserialize)]
#[must_use]
pub enum GetContainerHistoryResponse {
/// Found Entity History
@@ -762,7 +763,7 @@ pub enum GetContainerHistoryResponse {
GenericError(models::ErrorResponse),
}
-#[derive(Debug, PartialEq)]
+#[derive(Debug, PartialEq, Serialize, Deserialize)]
#[must_use]
pub enum GetContainerRedirectsResponse {
/// Found Entity Redirects
@@ -775,7 +776,7 @@ pub enum GetContainerRedirectsResponse {
GenericError(models::ErrorResponse),
}
-#[derive(Debug, PartialEq)]
+#[derive(Debug, PartialEq, Serialize, Deserialize)]
#[must_use]
pub enum GetContainerRevisionResponse {
/// Found Entity Revision
@@ -788,7 +789,7 @@ pub enum GetContainerRevisionResponse {
GenericError(models::ErrorResponse),
}
-#[derive(Debug, PartialEq)]
+#[derive(Debug, PartialEq, Serialize, Deserialize)]
#[must_use]
pub enum GetCreatorResponse {
/// Found Entity
@@ -801,7 +802,7 @@ pub enum GetCreatorResponse {
GenericError(models::ErrorResponse),
}
-#[derive(Debug, PartialEq)]
+#[derive(Debug, PartialEq, Serialize, Deserialize)]
#[must_use]
pub enum GetCreatorEditResponse {
/// Found Edit
@@ -814,7 +815,7 @@ pub enum GetCreatorEditResponse {
GenericError(models::ErrorResponse),
}
-#[derive(Debug, PartialEq)]
+#[derive(Debug, PartialEq, Serialize, Deserialize)]
#[must_use]
pub enum GetCreatorHistoryResponse {
/// Found Entity History
@@ -827,7 +828,7 @@ pub enum GetCreatorHistoryResponse {
GenericError(models::ErrorResponse),
}
-#[derive(Debug, PartialEq)]
+#[derive(Debug, PartialEq, Serialize, Deserialize)]
#[must_use]
pub enum GetCreatorRedirectsResponse {
/// Found Entity Redirects
@@ -840,7 +841,7 @@ pub enum GetCreatorRedirectsResponse {
GenericError(models::ErrorResponse),
}
-#[derive(Debug, PartialEq)]
+#[derive(Debug, PartialEq, Serialize, Deserialize)]
#[must_use]
pub enum GetCreatorReleasesResponse {
/// Found
@@ -853,7 +854,7 @@ pub enum GetCreatorReleasesResponse {
GenericError(models::ErrorResponse),
}
-#[derive(Debug, PartialEq)]
+#[derive(Debug, PartialEq, Serialize, Deserialize)]
#[must_use]
pub enum GetCreatorRevisionResponse {
/// Found Entity Revision
@@ -866,7 +867,7 @@ pub enum GetCreatorRevisionResponse {
GenericError(models::ErrorResponse),
}
-#[derive(Debug, PartialEq)]
+#[derive(Debug, PartialEq, Serialize, Deserialize)]
#[must_use]
pub enum GetEditgroupResponse {
/// Found
@@ -879,7 +880,7 @@ pub enum GetEditgroupResponse {
GenericError(models::ErrorResponse),
}
-#[derive(Debug, PartialEq)]
+#[derive(Debug, PartialEq, Serialize, Deserialize)]
#[must_use]
pub enum GetEditgroupAnnotationsResponse {
/// Success
@@ -899,7 +900,7 @@ pub enum GetEditgroupAnnotationsResponse {
GenericError(models::ErrorResponse),
}
-#[derive(Debug, PartialEq)]
+#[derive(Debug, PartialEq, Serialize, Deserialize)]
#[must_use]
pub enum GetEditgroupsReviewableResponse {
/// Found
@@ -912,7 +913,7 @@ pub enum GetEditgroupsReviewableResponse {
GenericError(models::ErrorResponse),
}
-#[derive(Debug, PartialEq)]
+#[derive(Debug, PartialEq, Serialize, Deserialize)]
#[must_use]
pub enum GetEditorResponse {
/// Found
@@ -925,7 +926,7 @@ pub enum GetEditorResponse {
GenericError(models::ErrorResponse),
}
-#[derive(Debug, PartialEq)]
+#[derive(Debug, PartialEq, Serialize, Deserialize)]
#[must_use]
pub enum GetEditorAnnotationsResponse {
/// Success
@@ -945,7 +946,7 @@ pub enum GetEditorAnnotationsResponse {
GenericError(models::ErrorResponse),
}
-#[derive(Debug, PartialEq)]
+#[derive(Debug, PartialEq, Serialize, Deserialize)]
#[must_use]
pub enum GetEditorEditgroupsResponse {
/// Found
@@ -958,7 +959,7 @@ pub enum GetEditorEditgroupsResponse {
GenericError(models::ErrorResponse),
}
-#[derive(Debug, PartialEq)]
+#[derive(Debug, PartialEq, Serialize, Deserialize)]
#[must_use]
pub enum GetFileResponse {
/// Found Entity
@@ -971,7 +972,7 @@ pub enum GetFileResponse {
GenericError(models::ErrorResponse),
}
-#[derive(Debug, PartialEq)]
+#[derive(Debug, PartialEq, Serialize, Deserialize)]
#[must_use]
pub enum GetFileEditResponse {
/// Found Edit
@@ -984,7 +985,7 @@ pub enum GetFileEditResponse {
GenericError(models::ErrorResponse),
}
-#[derive(Debug, PartialEq)]
+#[derive(Debug, PartialEq, Serialize, Deserialize)]
#[must_use]
pub enum GetFileHistoryResponse {
/// Found Entity History
@@ -997,7 +998,7 @@ pub enum GetFileHistoryResponse {
GenericError(models::ErrorResponse),
}
-#[derive(Debug, PartialEq)]
+#[derive(Debug, PartialEq, Serialize, Deserialize)]
#[must_use]
pub enum GetFileRedirectsResponse {
/// Found Entity Redirects
@@ -1010,7 +1011,7 @@ pub enum GetFileRedirectsResponse {
GenericError(models::ErrorResponse),
}
-#[derive(Debug, PartialEq)]
+#[derive(Debug, PartialEq, Serialize, Deserialize)]
#[must_use]
pub enum GetFileRevisionResponse {
/// Found Entity Revision
@@ -1023,7 +1024,7 @@ pub enum GetFileRevisionResponse {
GenericError(models::ErrorResponse),
}
-#[derive(Debug, PartialEq)]
+#[derive(Debug, PartialEq, Serialize, Deserialize)]
#[must_use]
pub enum GetFilesetResponse {
/// Found Entity
@@ -1036,7 +1037,7 @@ pub enum GetFilesetResponse {
GenericError(models::ErrorResponse),
}
-#[derive(Debug, PartialEq)]
+#[derive(Debug, PartialEq, Serialize, Deserialize)]
#[must_use]
pub enum GetFilesetEditResponse {
/// Found Edit
@@ -1049,7 +1050,7 @@ pub enum GetFilesetEditResponse {
GenericError(models::ErrorResponse),
}
-#[derive(Debug, PartialEq)]
+#[derive(Debug, PartialEq, Serialize, Deserialize)]
#[must_use]
pub enum GetFilesetHistoryResponse {
/// Found Entity History
@@ -1062,7 +1063,7 @@ pub enum GetFilesetHistoryResponse {
GenericError(models::ErrorResponse),
}
-#[derive(Debug, PartialEq)]
+#[derive(Debug, PartialEq, Serialize, Deserialize)]
#[must_use]
pub enum GetFilesetRedirectsResponse {
/// Found Entity Redirects
@@ -1075,7 +1076,7 @@ pub enum GetFilesetRedirectsResponse {
GenericError(models::ErrorResponse),
}
-#[derive(Debug, PartialEq)]
+#[derive(Debug, PartialEq, Serialize, Deserialize)]
#[must_use]
pub enum GetFilesetRevisionResponse {
/// Found Entity Revision
@@ -1088,7 +1089,7 @@ pub enum GetFilesetRevisionResponse {
GenericError(models::ErrorResponse),
}
-#[derive(Debug, PartialEq)]
+#[derive(Debug, PartialEq, Serialize, Deserialize)]
#[must_use]
pub enum GetReleaseResponse {
/// Found Entity
@@ -1101,7 +1102,7 @@ pub enum GetReleaseResponse {
GenericError(models::ErrorResponse),
}
-#[derive(Debug, PartialEq)]
+#[derive(Debug, PartialEq, Serialize, Deserialize)]
#[must_use]
pub enum GetReleaseEditResponse {
/// Found Edit
@@ -1114,7 +1115,7 @@ pub enum GetReleaseEditResponse {
GenericError(models::ErrorResponse),
}
-#[derive(Debug, PartialEq)]
+#[derive(Debug, PartialEq, Serialize, Deserialize)]
#[must_use]
pub enum GetReleaseFilesResponse {
/// Found
@@ -1127,7 +1128,7 @@ pub enum GetReleaseFilesResponse {
GenericError(models::ErrorResponse),
}
-#[derive(Debug, PartialEq)]
+#[derive(Debug, PartialEq, Serialize, Deserialize)]
#[must_use]
pub enum GetReleaseFilesetsResponse {
/// Found
@@ -1140,7 +1141,7 @@ pub enum GetReleaseFilesetsResponse {
GenericError(models::ErrorResponse),
}
-#[derive(Debug, PartialEq)]
+#[derive(Debug, PartialEq, Serialize, Deserialize)]
#[must_use]
pub enum GetReleaseHistoryResponse {
/// Found Entity History
@@ -1153,7 +1154,7 @@ pub enum GetReleaseHistoryResponse {
GenericError(models::ErrorResponse),
}
-#[derive(Debug, PartialEq)]
+#[derive(Debug, PartialEq, Serialize, Deserialize)]
#[must_use]
pub enum GetReleaseRedirectsResponse {
/// Found Entity Redirects
@@ -1166,7 +1167,7 @@ pub enum GetReleaseRedirectsResponse {
GenericError(models::ErrorResponse),
}
-#[derive(Debug, PartialEq)]
+#[derive(Debug, PartialEq, Serialize, Deserialize)]
#[must_use]
pub enum GetReleaseRevisionResponse {
/// Found Entity Revision
@@ -1179,7 +1180,7 @@ pub enum GetReleaseRevisionResponse {
GenericError(models::ErrorResponse),
}
-#[derive(Debug, PartialEq)]
+#[derive(Debug, PartialEq, Serialize, Deserialize)]
#[must_use]
pub enum GetReleaseWebcapturesResponse {
/// Found
@@ -1192,7 +1193,7 @@ pub enum GetReleaseWebcapturesResponse {
GenericError(models::ErrorResponse),
}
-#[derive(Debug, PartialEq)]
+#[derive(Debug, PartialEq, Serialize, Deserialize)]
#[must_use]
pub enum GetWebcaptureResponse {
/// Found Entity
@@ -1205,7 +1206,7 @@ pub enum GetWebcaptureResponse {
GenericError(models::ErrorResponse),
}
-#[derive(Debug, PartialEq)]
+#[derive(Debug, PartialEq, Serialize, Deserialize)]
#[must_use]
pub enum GetWebcaptureEditResponse {
/// Found Edit
@@ -1218,7 +1219,7 @@ pub enum GetWebcaptureEditResponse {
GenericError(models::ErrorResponse),
}
-#[derive(Debug, PartialEq)]
+#[derive(Debug, PartialEq, Serialize, Deserialize)]
#[must_use]
pub enum GetWebcaptureHistoryResponse {
/// Found Entity History
@@ -1231,7 +1232,7 @@ pub enum GetWebcaptureHistoryResponse {
GenericError(models::ErrorResponse),
}
-#[derive(Debug, PartialEq)]
+#[derive(Debug, PartialEq, Serialize, Deserialize)]
#[must_use]
pub enum GetWebcaptureRedirectsResponse {
/// Found Entity Redirects
@@ -1244,7 +1245,7 @@ pub enum GetWebcaptureRedirectsResponse {
GenericError(models::ErrorResponse),
}
-#[derive(Debug, PartialEq)]
+#[derive(Debug, PartialEq, Serialize, Deserialize)]
#[must_use]
pub enum GetWebcaptureRevisionResponse {
/// Found Entity Revision
@@ -1257,7 +1258,7 @@ pub enum GetWebcaptureRevisionResponse {
GenericError(models::ErrorResponse),
}
-#[derive(Debug, PartialEq)]
+#[derive(Debug, PartialEq, Serialize, Deserialize)]
#[must_use]
pub enum GetWorkResponse {
/// Found Entity
@@ -1270,7 +1271,7 @@ pub enum GetWorkResponse {
GenericError(models::ErrorResponse),
}
-#[derive(Debug, PartialEq)]
+#[derive(Debug, PartialEq, Serialize, Deserialize)]
#[must_use]
pub enum GetWorkEditResponse {
/// Found Edit
@@ -1283,7 +1284,7 @@ pub enum GetWorkEditResponse {
GenericError(models::ErrorResponse),
}
-#[derive(Debug, PartialEq)]
+#[derive(Debug, PartialEq, Serialize, Deserialize)]
#[must_use]
pub enum GetWorkHistoryResponse {
/// Found Entity History
@@ -1296,7 +1297,7 @@ pub enum GetWorkHistoryResponse {
GenericError(models::ErrorResponse),
}
-#[derive(Debug, PartialEq)]
+#[derive(Debug, PartialEq, Serialize, Deserialize)]
#[must_use]
pub enum GetWorkRedirectsResponse {
/// Found Entity Redirects
@@ -1309,7 +1310,7 @@ pub enum GetWorkRedirectsResponse {
GenericError(models::ErrorResponse),
}
-#[derive(Debug, PartialEq)]
+#[derive(Debug, PartialEq, Serialize, Deserialize)]
#[must_use]
pub enum GetWorkReleasesResponse {
/// Found
@@ -1322,7 +1323,7 @@ pub enum GetWorkReleasesResponse {
GenericError(models::ErrorResponse),
}
-#[derive(Debug, PartialEq)]
+#[derive(Debug, PartialEq, Serialize, Deserialize)]
#[must_use]
pub enum GetWorkRevisionResponse {
/// Found Entity Revision
@@ -1335,7 +1336,7 @@ pub enum GetWorkRevisionResponse {
GenericError(models::ErrorResponse),
}
-#[derive(Debug, PartialEq)]
+#[derive(Debug, PartialEq, Serialize, Deserialize)]
#[must_use]
pub enum LookupContainerResponse {
/// Found Entity
@@ -1348,7 +1349,7 @@ pub enum LookupContainerResponse {
GenericError(models::ErrorResponse),
}
-#[derive(Debug, PartialEq)]
+#[derive(Debug, PartialEq, Serialize, Deserialize)]
#[must_use]
pub enum LookupCreatorResponse {
/// Found Entity
@@ -1361,7 +1362,7 @@ pub enum LookupCreatorResponse {
GenericError(models::ErrorResponse),
}
-#[derive(Debug, PartialEq)]
+#[derive(Debug, PartialEq, Serialize, Deserialize)]
#[must_use]
pub enum LookupEditorResponse {
/// Found
@@ -1374,7 +1375,7 @@ pub enum LookupEditorResponse {
GenericError(models::ErrorResponse),
}
-#[derive(Debug, PartialEq)]
+#[derive(Debug, PartialEq, Serialize, Deserialize)]
#[must_use]
pub enum LookupFileResponse {
/// Found Entity
@@ -1387,7 +1388,7 @@ pub enum LookupFileResponse {
GenericError(models::ErrorResponse),
}
-#[derive(Debug, PartialEq)]
+#[derive(Debug, PartialEq, Serialize, Deserialize)]
#[must_use]
pub enum LookupReleaseResponse {
/// Found Entity
@@ -1400,7 +1401,7 @@ pub enum LookupReleaseResponse {
GenericError(models::ErrorResponse),
}
-#[derive(Debug, PartialEq)]
+#[derive(Debug, PartialEq, Serialize, Deserialize)]
#[must_use]
pub enum UpdateContainerResponse {
/// Updated Entity
@@ -1420,7 +1421,7 @@ pub enum UpdateContainerResponse {
GenericError(models::ErrorResponse),
}
-#[derive(Debug, PartialEq)]
+#[derive(Debug, PartialEq, Serialize, Deserialize)]
#[must_use]
pub enum UpdateCreatorResponse {
/// Updated Entity
@@ -1440,7 +1441,7 @@ pub enum UpdateCreatorResponse {
GenericError(models::ErrorResponse),
}
-#[derive(Debug, PartialEq)]
+#[derive(Debug, PartialEq, Serialize, Deserialize)]
#[must_use]
pub enum UpdateEditgroupResponse {
/// Updated Editgroup
@@ -1460,7 +1461,7 @@ pub enum UpdateEditgroupResponse {
GenericError(models::ErrorResponse),
}
-#[derive(Debug, PartialEq)]
+#[derive(Debug, PartialEq, Serialize, Deserialize)]
#[must_use]
pub enum UpdateEditorResponse {
/// Updated Editor
@@ -1480,7 +1481,7 @@ pub enum UpdateEditorResponse {
GenericError(models::ErrorResponse),
}
-#[derive(Debug, PartialEq)]
+#[derive(Debug, PartialEq, Serialize, Deserialize)]
#[must_use]
pub enum UpdateFileResponse {
/// Updated Entity
@@ -1500,7 +1501,7 @@ pub enum UpdateFileResponse {
GenericError(models::ErrorResponse),
}
-#[derive(Debug, PartialEq)]
+#[derive(Debug, PartialEq, Serialize, Deserialize)]
#[must_use]
pub enum UpdateFilesetResponse {
/// Updated Entity
@@ -1520,7 +1521,7 @@ pub enum UpdateFilesetResponse {
GenericError(models::ErrorResponse),
}
-#[derive(Debug, PartialEq)]
+#[derive(Debug, PartialEq, Serialize, Deserialize)]
#[must_use]
pub enum UpdateReleaseResponse {
/// Updated Entity
@@ -1540,7 +1541,7 @@ pub enum UpdateReleaseResponse {
GenericError(models::ErrorResponse),
}
-#[derive(Debug, PartialEq)]
+#[derive(Debug, PartialEq, Serialize, Deserialize)]
#[must_use]
pub enum UpdateWebcaptureResponse {
/// Updated Entity
@@ -1560,7 +1561,7 @@ pub enum UpdateWebcaptureResponse {
GenericError(models::ErrorResponse),
}
-#[derive(Debug, PartialEq)]
+#[derive(Debug, PartialEq, Serialize, Deserialize)]
#[must_use]
pub enum UpdateWorkResponse {
/// Updated Entity
diff --git a/fatcat-openapi/src/models.rs b/fatcat-openapi/src/models.rs
index 094d8b3..2aead11 100644
--- a/fatcat-openapi/src/models.rs
+++ b/fatcat-openapi/src/models.rs
@@ -4,51 +4,6 @@
use crate::header;
use crate::models;
-// Methods for converting between header::IntoHeaderValue<AuthOidc> and hyper::header::HeaderValue
-
-#[cfg(any(feature = "client", feature = "server"))]
-impl std::convert::TryFrom<header::IntoHeaderValue<AuthOidc>> for hyper::header::HeaderValue {
- type Error = String;
-
- fn try_from(
- hdr_value: header::IntoHeaderValue<AuthOidc>,
- ) -> std::result::Result<Self, Self::Error> {
- let hdr_value = hdr_value.to_string();
- match hyper::header::HeaderValue::from_str(&hdr_value) {
- std::result::Result::Ok(value) => std::result::Result::Ok(value),
- std::result::Result::Err(e) => std::result::Result::Err(format!(
- "Invalid header value for AuthOidc - value: {} is invalid {}",
- hdr_value, e
- )),
- }
- }
-}
-
-#[cfg(any(feature = "client", feature = "server"))]
-impl std::convert::TryFrom<hyper::header::HeaderValue> for header::IntoHeaderValue<AuthOidc> {
- type Error = String;
-
- fn try_from(hdr_value: hyper::header::HeaderValue) -> std::result::Result<Self, Self::Error> {
- match hdr_value.to_str() {
- std::result::Result::Ok(value) => {
- match <AuthOidc as std::str::FromStr>::from_str(value) {
- std::result::Result::Ok(value) => {
- std::result::Result::Ok(header::IntoHeaderValue(value))
- }
- std::result::Result::Err(err) => std::result::Result::Err(format!(
- "Unable to convert header value '{}' into AuthOidc - {}",
- value, err
- )),
- }
- }
- std::result::Result::Err(e) => std::result::Result::Err(format!(
- "Unable to convert header: {:?} to string: {}",
- hdr_value, e
- )),
- }
- }
-}
-
#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
#[cfg_attr(feature = "conversion", derive(frunk::LabelledGeneric))]
pub struct AuthOidc {
@@ -137,18 +92,22 @@ impl std::str::FromStr for AuthOidc {
if let Some(key) = key_result {
match key {
- "provider" => intermediate_rep
- .provider
- .push(String::from_str(val).map_err(|x| format!("{}", x))?),
- "sub" => intermediate_rep
- .sub
- .push(String::from_str(val).map_err(|x| format!("{}", x))?),
- "iss" => intermediate_rep
- .iss
- .push(String::from_str(val).map_err(|x| format!("{}", x))?),
- "preferred_username" => intermediate_rep
- .preferred_username
- .push(String::from_str(val).map_err(|x| format!("{}", x))?),
+ "provider" => intermediate_rep.provider.push(
+ <String as std::str::FromStr>::from_str(val)
+ .map_err(|x| format!("{}", x))?,
+ ),
+ "sub" => intermediate_rep.sub.push(
+ <String as std::str::FromStr>::from_str(val)
+ .map_err(|x| format!("{}", x))?,
+ ),
+ "iss" => intermediate_rep.iss.push(
+ <String as std::str::FromStr>::from_str(val)
+ .map_err(|x| format!("{}", x))?,
+ ),
+ "preferred_username" => intermediate_rep.preferred_username.push(
+ <String as std::str::FromStr>::from_str(val)
+ .map_err(|x| format!("{}", x))?,
+ ),
_ => {
return std::result::Result::Err(
"Unexpected key while parsing AuthOidc".to_string(),
@@ -187,20 +146,20 @@ impl std::str::FromStr for AuthOidc {
}
}
-// Methods for converting between header::IntoHeaderValue<AuthOidcResult> and hyper::header::HeaderValue
+// Methods for converting between header::IntoHeaderValue<AuthOidc> and hyper::header::HeaderValue
#[cfg(any(feature = "client", feature = "server"))]
-impl std::convert::TryFrom<header::IntoHeaderValue<AuthOidcResult>> for hyper::header::HeaderValue {
+impl std::convert::TryFrom<header::IntoHeaderValue<AuthOidc>> for hyper::header::HeaderValue {
type Error = String;
fn try_from(
- hdr_value: header::IntoHeaderValue<AuthOidcResult>,
+ hdr_value: header::IntoHeaderValue<AuthOidc>,
) -> std::result::Result<Self, Self::Error> {
let hdr_value = hdr_value.to_string();
match hyper::header::HeaderValue::from_str(&hdr_value) {
std::result::Result::Ok(value) => std::result::Result::Ok(value),
std::result::Result::Err(e) => std::result::Result::Err(format!(
- "Invalid header value for AuthOidcResult - value: {} is invalid {}",
+ "Invalid header value for AuthOidc - value: {} is invalid {}",
hdr_value, e
)),
}
@@ -208,18 +167,18 @@ impl std::convert::TryFrom<header::IntoHeaderValue<AuthOidcResult>> for hyper::h
}
#[cfg(any(feature = "client", feature = "server"))]
-impl std::convert::TryFrom<hyper::header::HeaderValue> for header::IntoHeaderValue<AuthOidcResult> {
+impl std::convert::TryFrom<hyper::header::HeaderValue> for header::IntoHeaderValue<AuthOidc> {
type Error = String;
fn try_from(hdr_value: hyper::header::HeaderValue) -> std::result::Result<Self, Self::Error> {
match hdr_value.to_str() {
std::result::Result::Ok(value) => {
- match <AuthOidcResult as std::str::FromStr>::from_str(value) {
+ match <AuthOidc as std::str::FromStr>::from_str(value) {
std::result::Result::Ok(value) => {
std::result::Result::Ok(header::IntoHeaderValue(value))
}
std::result::Result::Err(err) => std::result::Result::Err(format!(
- "Unable to convert header value '{}' into AuthOidcResult - {}",
+ "Unable to convert header value '{}' into AuthOidc - {}",
value, err
)),
}
@@ -298,12 +257,14 @@ impl std::str::FromStr for AuthOidcResult {
if let Some(key) = key_result {
match key {
- "editor" => intermediate_rep
- .editor
- .push(models::Editor::from_str(val).map_err(|x| format!("{}", x))?),
- "token" => intermediate_rep
- .token
- .push(String::from_str(val).map_err(|x| format!("{}", x))?),
+ "editor" => intermediate_rep.editor.push(
+ <models::Editor as std::str::FromStr>::from_str(val)
+ .map_err(|x| format!("{}", x))?,
+ ),
+ "token" => intermediate_rep.token.push(
+ <String as std::str::FromStr>::from_str(val)
+ .map_err(|x| format!("{}", x))?,
+ ),
_ => {
return std::result::Result::Err(
"Unexpected key while parsing AuthOidcResult".to_string(),
@@ -332,22 +293,20 @@ impl std::str::FromStr for AuthOidcResult {
}
}
-// Methods for converting between header::IntoHeaderValue<AuthTokenResult> and hyper::header::HeaderValue
+// Methods for converting between header::IntoHeaderValue<AuthOidcResult> and hyper::header::HeaderValue
#[cfg(any(feature = "client", feature = "server"))]
-impl std::convert::TryFrom<header::IntoHeaderValue<AuthTokenResult>>
- for hyper::header::HeaderValue
-{
+impl std::convert::TryFrom<header::IntoHeaderValue<AuthOidcResult>> for hyper::header::HeaderValue {
type Error = String;
fn try_from(
- hdr_value: header::IntoHeaderValue<AuthTokenResult>,
+ hdr_value: header::IntoHeaderValue<AuthOidcResult>,
) -> std::result::Result<Self, Self::Error> {
let hdr_value = hdr_value.to_string();
match hyper::header::HeaderValue::from_str(&hdr_value) {
std::result::Result::Ok(value) => std::result::Result::Ok(value),
std::result::Result::Err(e) => std::result::Result::Err(format!(
- "Invalid header value for AuthTokenResult - value: {} is invalid {}",
+ "Invalid header value for AuthOidcResult - value: {} is invalid {}",
hdr_value, e
)),
}
@@ -355,20 +314,18 @@ impl std::convert::TryFrom<header::IntoHeaderValue<AuthTokenResult>>
}
#[cfg(any(feature = "client", feature = "server"))]
-impl std::convert::TryFrom<hyper::header::HeaderValue>
- for header::IntoHeaderValue<AuthTokenResult>
-{
+impl std::convert::TryFrom<hyper::header::HeaderValue> for header::IntoHeaderValue<AuthOidcResult> {
type Error = String;
fn try_from(hdr_value: hyper::header::HeaderValue) -> std::result::Result<Self, Self::Error> {
match hdr_value.to_str() {
std::result::Result::Ok(value) => {
- match <AuthTokenResult as std::str::FromStr>::from_str(value) {
+ match <AuthOidcResult as std::str::FromStr>::from_str(value) {
std::result::Result::Ok(value) => {
std::result::Result::Ok(header::IntoHeaderValue(value))
}
std::result::Result::Err(err) => std::result::Result::Err(format!(
- "Unable to convert header value '{}' into AuthTokenResult - {}",
+ "Unable to convert header value '{}' into AuthOidcResult - {}",
value, err
)),
}
@@ -439,9 +396,10 @@ impl std::str::FromStr for AuthTokenResult {
if let Some(key) = key_result {
match key {
- "token" => intermediate_rep
- .token
- .push(String::from_str(val).map_err(|x| format!("{}", x))?),
+ "token" => intermediate_rep.token.push(
+ <String as std::str::FromStr>::from_str(val)
+ .map_err(|x| format!("{}", x))?,
+ ),
_ => {
return std::result::Result::Err(
"Unexpected key while parsing AuthTokenResult".to_string(),
@@ -465,20 +423,22 @@ impl std::str::FromStr for AuthTokenResult {
}
}
-// Methods for converting between header::IntoHeaderValue<ChangelogEntry> and hyper::header::HeaderValue
+// Methods for converting between header::IntoHeaderValue<AuthTokenResult> and hyper::header::HeaderValue
#[cfg(any(feature = "client", feature = "server"))]
-impl std::convert::TryFrom<header::IntoHeaderValue<ChangelogEntry>> for hyper::header::HeaderValue {
+impl std::convert::TryFrom<header::IntoHeaderValue<AuthTokenResult>>
+ for hyper::header::HeaderValue
+{
type Error = String;
fn try_from(
- hdr_value: header::IntoHeaderValue<ChangelogEntry>,
+ hdr_value: header::IntoHeaderValue<AuthTokenResult>,
) -> std::result::Result<Self, Self::Error> {
let hdr_value = hdr_value.to_string();
match hyper::header::HeaderValue::from_str(&hdr_value) {
std::result::Result::Ok(value) => std::result::Result::Ok(value),
std::result::Result::Err(e) => std::result::Result::Err(format!(
- "Invalid header value for ChangelogEntry - value: {} is invalid {}",
+ "Invalid header value for AuthTokenResult - value: {} is invalid {}",
hdr_value, e
)),
}
@@ -486,18 +446,20 @@ impl std::convert::TryFrom<header::IntoHeaderValue<ChangelogEntry>> for hyper::h
}
#[cfg(any(feature = "client", feature = "server"))]
-impl std::convert::TryFrom<hyper::header::HeaderValue> for header::IntoHeaderValue<ChangelogEntry> {
+impl std::convert::TryFrom<hyper::header::HeaderValue>
+ for header::IntoHeaderValue<AuthTokenResult>
+{
type Error = String;
fn try_from(hdr_value: hyper::header::HeaderValue) -> std::result::Result<Self, Self::Error> {
match hdr_value.to_str() {
std::result::Result::Ok(value) => {
- match <ChangelogEntry as std::str::FromStr>::from_str(value) {
+ match <AuthTokenResult as std::str::FromStr>::from_str(value) {
std::result::Result::Ok(value) => {
std::result::Result::Ok(header::IntoHeaderValue(value))
}
std::result::Result::Err(err) => std::result::Result::Err(format!(
- "Unable to convert header value '{}' into ChangelogEntry - {}",
+ "Unable to convert header value '{}' into AuthTokenResult - {}",
value, err
)),
}
@@ -600,19 +562,21 @@ impl std::str::FromStr for ChangelogEntry {
if let Some(key) = key_result {
match key {
- "index" => intermediate_rep
- .index
- .push(i64::from_str(val).map_err(|x| format!("{}", x))?),
- "editgroup_id" => intermediate_rep
- .editgroup_id
- .push(String::from_str(val).map_err(|x| format!("{}", x))?),
+ "index" => intermediate_rep.index.push(
+ <i64 as std::str::FromStr>::from_str(val).map_err(|x| format!("{}", x))?,
+ ),
+ "editgroup_id" => intermediate_rep.editgroup_id.push(
+ <String as std::str::FromStr>::from_str(val)
+ .map_err(|x| format!("{}", x))?,
+ ),
"timestamp" => intermediate_rep.timestamp.push(
- chrono::DateTime::<chrono::Utc>::from_str(val)
+ <chrono::DateTime<chrono::Utc> as std::str::FromStr>::from_str(val)
+ .map_err(|x| format!("{}", x))?,
+ ),
+ "editgroup" => intermediate_rep.editgroup.push(
+ <models::Editgroup as std::str::FromStr>::from_str(val)
.map_err(|x| format!("{}", x))?,
),
- "editgroup" => intermediate_rep
- .editgroup
- .push(models::Editgroup::from_str(val).map_err(|x| format!("{}", x))?),
_ => {
return std::result::Result::Err(
"Unexpected key while parsing ChangelogEntry".to_string(),
@@ -647,22 +611,20 @@ impl std::str::FromStr for ChangelogEntry {
}
}
-// Methods for converting between header::IntoHeaderValue<ContainerAutoBatch> and hyper::header::HeaderValue
+// Methods for converting between header::IntoHeaderValue<ChangelogEntry> and hyper::header::HeaderValue
#[cfg(any(feature = "client", feature = "server"))]
-impl std::convert::TryFrom<header::IntoHeaderValue<ContainerAutoBatch>>
- for hyper::header::HeaderValue
-{
+impl std::convert::TryFrom<header::IntoHeaderValue<ChangelogEntry>> for hyper::header::HeaderValue {
type Error = String;
fn try_from(
- hdr_value: header::IntoHeaderValue<ContainerAutoBatch>,
+ hdr_value: header::IntoHeaderValue<ChangelogEntry>,
) -> std::result::Result<Self, Self::Error> {
let hdr_value = hdr_value.to_string();
match hyper::header::HeaderValue::from_str(&hdr_value) {
std::result::Result::Ok(value) => std::result::Result::Ok(value),
std::result::Result::Err(e) => std::result::Result::Err(format!(
- "Invalid header value for ContainerAutoBatch - value: {} is invalid {}",
+ "Invalid header value for ChangelogEntry - value: {} is invalid {}",
hdr_value, e
)),
}
@@ -670,20 +632,18 @@ impl std::convert::TryFrom<header::IntoHeaderValue<ContainerAutoBatch>>
}
#[cfg(any(feature = "client", feature = "server"))]
-impl std::convert::TryFrom<hyper::header::HeaderValue>
- for header::IntoHeaderValue<ContainerAutoBatch>
-{
+impl std::convert::TryFrom<hyper::header::HeaderValue> for header::IntoHeaderValue<ChangelogEntry> {
type Error = String;
fn try_from(hdr_value: hyper::header::HeaderValue) -> std::result::Result<Self, Self::Error> {
match hdr_value.to_str() {
std::result::Result::Ok(value) => {
- match <ContainerAutoBatch as std::str::FromStr>::from_str(value) {
+ match <ChangelogEntry as std::str::FromStr>::from_str(value) {
std::result::Result::Ok(value) => {
std::result::Result::Ok(header::IntoHeaderValue(value))
}
std::result::Result::Err(err) => std::result::Result::Err(format!(
- "Unable to convert header value '{}' into ContainerAutoBatch - {}",
+ "Unable to convert header value '{}' into ChangelogEntry - {}",
value, err
)),
}
@@ -764,9 +724,10 @@ impl std::str::FromStr for ContainerAutoBatch {
if let Some(key) = key_result {
match key {
- "editgroup" => intermediate_rep
- .editgroup
- .push(models::Editgroup::from_str(val).map_err(|x| format!("{}", x))?),
+ "editgroup" => intermediate_rep.editgroup.push(
+ <models::Editgroup as std::str::FromStr>::from_str(val)
+ .map_err(|x| format!("{}", x))?,
+ ),
"entity_list" => return std::result::Result::Err(
"Parsing a container in this style is not supported in ContainerAutoBatch"
.to_string(),
@@ -799,22 +760,22 @@ impl std::str::FromStr for ContainerAutoBatch {
}
}
-// Methods for converting between header::IntoHeaderValue<ContainerEntity> and hyper::header::HeaderValue
+// Methods for converting between header::IntoHeaderValue<ContainerAutoBatch> and hyper::header::HeaderValue
#[cfg(any(feature = "client", feature = "server"))]
-impl std::convert::TryFrom<header::IntoHeaderValue<ContainerEntity>>
+impl std::convert::TryFrom<header::IntoHeaderValue<ContainerAutoBatch>>
for hyper::header::HeaderValue
{
type Error = String;
fn try_from(
- hdr_value: header::IntoHeaderValue<ContainerEntity>,
+ hdr_value: header::IntoHeaderValue<ContainerAutoBatch>,
) -> std::result::Result<Self, Self::Error> {
let hdr_value = hdr_value.to_string();
match hyper::header::HeaderValue::from_str(&hdr_value) {
std::result::Result::Ok(value) => std::result::Result::Ok(value),
std::result::Result::Err(e) => std::result::Result::Err(format!(
- "Invalid header value for ContainerEntity - value: {} is invalid {}",
+ "Invalid header value for ContainerAutoBatch - value: {} is invalid {}",
hdr_value, e
)),
}
@@ -823,19 +784,19 @@ impl std::convert::TryFrom<header::IntoHeaderValue<ContainerEntity>>
#[cfg(any(feature = "client", feature = "server"))]
impl std::convert::TryFrom<hyper::header::HeaderValue>
- for header::IntoHeaderValue<ContainerEntity>
+ for header::IntoHeaderValue<ContainerAutoBatch>
{
type Error = String;
fn try_from(hdr_value: hyper::header::HeaderValue) -> std::result::Result<Self, Self::Error> {
match hdr_value.to_str() {
std::result::Result::Ok(value) => {
- match <ContainerEntity as std::str::FromStr>::from_str(value) {
+ match <ContainerAutoBatch as std::str::FromStr>::from_str(value) {
std::result::Result::Ok(value) => {
std::result::Result::Ok(header::IntoHeaderValue(value))
}
std::result::Result::Err(err) => std::result::Result::Err(format!(
- "Unable to convert header value '{}' into ContainerEntity - {}",
+ "Unable to convert header value '{}' into ContainerAutoBatch - {}",
value, err
)),
}
@@ -1063,18 +1024,22 @@ impl std::str::FromStr for ContainerEntity {
if let Some(key) = key_result {
match key {
- "state" => intermediate_rep
- .state
- .push(String::from_str(val).map_err(|x| format!("{}", x))?),
- "ident" => intermediate_rep
- .ident
- .push(String::from_str(val).map_err(|x| format!("{}", x))?),
- "revision" => intermediate_rep
- .revision
- .push(String::from_str(val).map_err(|x| format!("{}", x))?),
- "redirect" => intermediate_rep
- .redirect
- .push(String::from_str(val).map_err(|x| format!("{}", x))?),
+ "state" => intermediate_rep.state.push(
+ <String as std::str::FromStr>::from_str(val)
+ .map_err(|x| format!("{}", x))?,
+ ),
+ "ident" => intermediate_rep.ident.push(
+ <String as std::str::FromStr>::from_str(val)
+ .map_err(|x| format!("{}", x))?,
+ ),
+ "revision" => intermediate_rep.revision.push(
+ <String as std::str::FromStr>::from_str(val)
+ .map_err(|x| format!("{}", x))?,
+ ),
+ "redirect" => intermediate_rep.redirect.push(
+ <String as std::str::FromStr>::from_str(val)
+ .map_err(|x| format!("{}", x))?,
+ ),
"extra" => {
return std::result::Result::Err(
"Parsing a container in this style is not supported in ContainerEntity"
@@ -1087,30 +1052,38 @@ impl std::str::FromStr for ContainerEntity {
.to_string(),
)
}
- "name" => intermediate_rep
- .name
- .push(String::from_str(val).map_err(|x| format!("{}", x))?),
- "container_type" => intermediate_rep
- .container_type
- .push(String::from_str(val).map_err(|x| format!("{}", x))?),
- "publication_status" => intermediate_rep
- .publication_status
- .push(String::from_str(val).map_err(|x| format!("{}", x))?),
- "publisher" => intermediate_rep
- .publisher
- .push(String::from_str(val).map_err(|x| format!("{}", x))?),
- "issnl" => intermediate_rep
- .issnl
- .push(String::from_str(val).map_err(|x| format!("{}", x))?),
- "issne" => intermediate_rep
- .issne
- .push(String::from_str(val).map_err(|x| format!("{}", x))?),
- "issnp" => intermediate_rep
- .issnp
- .push(String::from_str(val).map_err(|x| format!("{}", x))?),
- "wikidata_qid" => intermediate_rep
- .wikidata_qid
- .push(String::from_str(val).map_err(|x| format!("{}", x))?),
+ "name" => intermediate_rep.name.push(
+ <String as std::str::FromStr>::from_str(val)
+ .map_err(|x| format!("{}", x))?,
+ ),
+ "container_type" => intermediate_rep.container_type.push(
+ <String as std::str::FromStr>::from_str(val)
+ .map_err(|x| format!("{}", x))?,
+ ),
+ "publication_status" => intermediate_rep.publication_status.push(
+ <String as std::str::FromStr>::from_str(val)
+ .map_err(|x| format!("{}", x))?,
+ ),
+ "publisher" => intermediate_rep.publisher.push(
+ <String as std::str::FromStr>::from_str(val)
+ .map_err(|x| format!("{}", x))?,
+ ),
+ "issnl" => intermediate_rep.issnl.push(
+ <String as std::str::FromStr>::from_str(val)
+ .map_err(|x| format!("{}", x))?,
+ ),
+ "issne" => intermediate_rep.issne.push(
+ <String as std::str::FromStr>::from_str(val)
+ .map_err(|x| format!("{}", x))?,
+ ),
+ "issnp" => intermediate_rep.issnp.push(
+ <String as std::str::FromStr>::from_str(val)
+ .map_err(|x| format!("{}", x))?,
+ ),
+ "wikidata_qid" => intermediate_rep.wikidata_qid.push(
+ <String as std::str::FromStr>::from_str(val)
+ .map_err(|x| format!("{}", x))?,
+ ),
_ => {
return std::result::Result::Err(
"Unexpected key while parsing ContainerEntity".to_string(),
@@ -1143,22 +1116,22 @@ impl std::str::FromStr for ContainerEntity {
}
}
-// Methods for converting between header::IntoHeaderValue<CreatorAutoBatch> and hyper::header::HeaderValue
+// Methods for converting between header::IntoHeaderValue<ContainerEntity> and hyper::header::HeaderValue
#[cfg(any(feature = "client", feature = "server"))]
-impl std::convert::TryFrom<header::IntoHeaderValue<CreatorAutoBatch>>
+impl std::convert::TryFrom<header::IntoHeaderValue<ContainerEntity>>
for hyper::header::HeaderValue
{
type Error = String;
fn try_from(
- hdr_value: header::IntoHeaderValue<CreatorAutoBatch>,
+ hdr_value: header::IntoHeaderValue<ContainerEntity>,
) -> std::result::Result<Self, Self::Error> {
let hdr_value = hdr_value.to_string();
match hyper::header::HeaderValue::from_str(&hdr_value) {
std::result::Result::Ok(value) => std::result::Result::Ok(value),
std::result::Result::Err(e) => std::result::Result::Err(format!(
- "Invalid header value for CreatorAutoBatch - value: {} is invalid {}",
+ "Invalid header value for ContainerEntity - value: {} is invalid {}",
hdr_value, e
)),
}
@@ -1167,19 +1140,19 @@ impl std::convert::TryFrom<header::IntoHeaderValue<CreatorAutoBatch>>
#[cfg(any(feature = "client", feature = "server"))]
impl std::convert::TryFrom<hyper::header::HeaderValue>
- for header::IntoHeaderValue<CreatorAutoBatch>
+ for header::IntoHeaderValue<ContainerEntity>
{
type Error = String;
fn try_from(hdr_value: hyper::header::HeaderValue) -> std::result::Result<Self, Self::Error> {
match hdr_value.to_str() {
std::result::Result::Ok(value) => {
- match <CreatorAutoBatch as std::str::FromStr>::from_str(value) {
+ match <ContainerEntity as std::str::FromStr>::from_str(value) {
std::result::Result::Ok(value) => {
std::result::Result::Ok(header::IntoHeaderValue(value))
}
std::result::Result::Err(err) => std::result::Result::Err(format!(
- "Unable to convert header value '{}' into CreatorAutoBatch - {}",
+ "Unable to convert header value '{}' into ContainerEntity - {}",
value, err
)),
}
@@ -1260,9 +1233,10 @@ impl std::str::FromStr for CreatorAutoBatch {
if let Some(key) = key_result {
match key {
- "editgroup" => intermediate_rep
- .editgroup
- .push(models::Editgroup::from_str(val).map_err(|x| format!("{}", x))?),
+ "editgroup" => intermediate_rep.editgroup.push(
+ <models::Editgroup as std::str::FromStr>::from_str(val)
+ .map_err(|x| format!("{}", x))?,
+ ),
"entity_list" => return std::result::Result::Err(
"Parsing a container in this style is not supported in CreatorAutoBatch"
.to_string(),
@@ -1295,20 +1269,22 @@ impl std::str::FromStr for CreatorAutoBatch {
}
}
-// Methods for converting between header::IntoHeaderValue<CreatorEntity> and hyper::header::HeaderValue
+// Methods for converting between header::IntoHeaderValue<CreatorAutoBatch> and hyper::header::HeaderValue
#[cfg(any(feature = "client", feature = "server"))]
-impl std::convert::TryFrom<header::IntoHeaderValue<CreatorEntity>> for hyper::header::HeaderValue {
+impl std::convert::TryFrom<header::IntoHeaderValue<CreatorAutoBatch>>
+ for hyper::header::HeaderValue
+{
type Error = String;
fn try_from(
- hdr_value: header::IntoHeaderValue<CreatorEntity>,
+ hdr_value: header::IntoHeaderValue<CreatorAutoBatch>,
) -> std::result::Result<Self, Self::Error> {
let hdr_value = hdr_value.to_string();
match hyper::header::HeaderValue::from_str(&hdr_value) {
std::result::Result::Ok(value) => std::result::Result::Ok(value),
std::result::Result::Err(e) => std::result::Result::Err(format!(
- "Invalid header value for CreatorEntity - value: {} is invalid {}",
+ "Invalid header value for CreatorAutoBatch - value: {} is invalid {}",
hdr_value, e
)),
}
@@ -1316,18 +1292,20 @@ impl std::convert::TryFrom<header::IntoHeaderValue<CreatorEntity>> for hyper::he
}
#[cfg(any(feature = "client", feature = "server"))]
-impl std::convert::TryFrom<hyper::header::HeaderValue> for header::IntoHeaderValue<CreatorEntity> {
+impl std::convert::TryFrom<hyper::header::HeaderValue>
+ for header::IntoHeaderValue<CreatorAutoBatch>
+{
type Error = String;
fn try_from(hdr_value: hyper::header::HeaderValue) -> std::result::Result<Self, Self::Error> {
match hdr_value.to_str() {
std::result::Result::Ok(value) => {
- match <CreatorEntity as std::str::FromStr>::from_str(value) {
+ match <CreatorAutoBatch as std::str::FromStr>::from_str(value) {
std::result::Result::Ok(value) => {
std::result::Result::Ok(header::IntoHeaderValue(value))
}
std::result::Result::Err(err) => std::result::Result::Err(format!(
- "Unable to convert header value '{}' into CreatorEntity - {}",
+ "Unable to convert header value '{}' into CreatorAutoBatch - {}",
value, err
)),
}
@@ -1520,18 +1498,22 @@ impl std::str::FromStr for CreatorEntity {
if let Some(key) = key_result {
match key {
- "state" => intermediate_rep
- .state
- .push(String::from_str(val).map_err(|x| format!("{}", x))?),
- "ident" => intermediate_rep
- .ident
- .push(String::from_str(val).map_err(|x| format!("{}", x))?),
- "revision" => intermediate_rep
- .revision
- .push(String::from_str(val).map_err(|x| format!("{}", x))?),
- "redirect" => intermediate_rep
- .redirect
- .push(String::from_str(val).map_err(|x| format!("{}", x))?),
+ "state" => intermediate_rep.state.push(
+ <String as std::str::FromStr>::from_str(val)
+ .map_err(|x| format!("{}", x))?,
+ ),
+ "ident" => intermediate_rep.ident.push(
+ <String as std::str::FromStr>::from_str(val)
+ .map_err(|x| format!("{}", x))?,
+ ),
+ "revision" => intermediate_rep.revision.push(
+ <String as std::str::FromStr>::from_str(val)
+ .map_err(|x| format!("{}", x))?,
+ ),
+ "redirect" => intermediate_rep.redirect.push(
+ <String as std::str::FromStr>::from_str(val)
+ .map_err(|x| format!("{}", x))?,
+ ),
"extra" => {
return std::result::Result::Err(
"Parsing a container in this style is not supported in CreatorEntity"
@@ -1544,21 +1526,26 @@ impl std::str::FromStr for CreatorEntity {
.to_string(),
)
}
- "display_name" => intermediate_rep
- .display_name
- .push(String::from_str(val).map_err(|x| format!("{}", x))?),
- "given_name" => intermediate_rep
- .given_name
- .push(String::from_str(val).map_err(|x| format!("{}", x))?),
- "surname" => intermediate_rep
- .surname
- .push(String::from_str(val).map_err(|x| format!("{}", x))?),
- "orcid" => intermediate_rep
- .orcid
- .push(String::from_str(val).map_err(|x| format!("{}", x))?),
- "wikidata_qid" => intermediate_rep
- .wikidata_qid
- .push(String::from_str(val).map_err(|x| format!("{}", x))?),
+ "display_name" => intermediate_rep.display_name.push(
+ <String as std::str::FromStr>::from_str(val)
+ .map_err(|x| format!("{}", x))?,
+ ),
+ "given_name" => intermediate_rep.given_name.push(
+ <String as std::str::FromStr>::from_str(val)
+ .map_err(|x| format!("{}", x))?,
+ ),
+ "surname" => intermediate_rep.surname.push(
+ <String as std::str::FromStr>::from_str(val)
+ .map_err(|x| format!("{}", x))?,
+ ),
+ "orcid" => intermediate_rep.orcid.push(
+ <String as std::str::FromStr>::from_str(val)
+ .map_err(|x| format!("{}", x))?,
+ ),
+ "wikidata_qid" => intermediate_rep.wikidata_qid.push(
+ <String as std::str::FromStr>::from_str(val)
+ .map_err(|x| format!("{}", x))?,
+ ),
_ => {
return std::result::Result::Err(
"Unexpected key while parsing CreatorEntity".to_string(),
@@ -1588,20 +1575,20 @@ impl std::str::FromStr for CreatorEntity {
}
}
-// Methods for converting between header::IntoHeaderValue<Editgroup> and hyper::header::HeaderValue
+// Methods for converting between header::IntoHeaderValue<CreatorEntity> and hyper::header::HeaderValue
#[cfg(any(feature = "client", feature = "server"))]
-impl std::convert::TryFrom<header::IntoHeaderValue<Editgroup>> for hyper::header::HeaderValue {
+impl std::convert::TryFrom<header::IntoHeaderValue<CreatorEntity>> for hyper::header::HeaderValue {
type Error = String;
fn try_from(
- hdr_value: header::IntoHeaderValue<Editgroup>,
+ hdr_value: header::IntoHeaderValue<CreatorEntity>,
) -> std::result::Result<Self, Self::Error> {
let hdr_value = hdr_value.to_string();
match hyper::header::HeaderValue::from_str(&hdr_value) {
std::result::Result::Ok(value) => std::result::Result::Ok(value),
std::result::Result::Err(e) => std::result::Result::Err(format!(
- "Invalid header value for Editgroup - value: {} is invalid {}",
+ "Invalid header value for CreatorEntity - value: {} is invalid {}",
hdr_value, e
)),
}
@@ -1609,18 +1596,18 @@ impl std::convert::TryFrom<header::IntoHeaderValue<Editgroup>> for hyper::header
}
#[cfg(any(feature = "client", feature = "server"))]
-impl std::convert::TryFrom<hyper::header::HeaderValue> for header::IntoHeaderValue<Editgroup> {
+impl std::convert::TryFrom<hyper::header::HeaderValue> for header::IntoHeaderValue<CreatorEntity> {
type Error = String;
fn try_from(hdr_value: hyper::header::HeaderValue) -> std::result::Result<Self, Self::Error> {
match hdr_value.to_str() {
std::result::Result::Ok(value) => {
- match <Editgroup as std::str::FromStr>::from_str(value) {
+ match <CreatorEntity as std::str::FromStr>::from_str(value) {
std::result::Result::Ok(value) => {
std::result::Result::Ok(header::IntoHeaderValue(value))
}
std::result::Result::Err(err) => std::result::Result::Err(format!(
- "Unable to convert header value '{}' into Editgroup - {}",
+ "Unable to convert header value '{}' into CreatorEntity - {}",
value, err
)),
}
@@ -1786,29 +1773,33 @@ impl std::str::FromStr for Editgroup {
if let Some(key) = key_result {
match key {
- "editgroup_id" => intermediate_rep
- .editgroup_id
- .push(String::from_str(val).map_err(|x| format!("{}", x))?),
- "editor_id" => intermediate_rep
- .editor_id
- .push(String::from_str(val).map_err(|x| format!("{}", x))?),
- "editor" => intermediate_rep
- .editor
- .push(models::Editor::from_str(val).map_err(|x| format!("{}", x))?),
- "changelog_index" => intermediate_rep
- .changelog_index
- .push(i64::from_str(val).map_err(|x| format!("{}", x))?),
+ "editgroup_id" => intermediate_rep.editgroup_id.push(
+ <String as std::str::FromStr>::from_str(val)
+ .map_err(|x| format!("{}", x))?,
+ ),
+ "editor_id" => intermediate_rep.editor_id.push(
+ <String as std::str::FromStr>::from_str(val)
+ .map_err(|x| format!("{}", x))?,
+ ),
+ "editor" => intermediate_rep.editor.push(
+ <models::Editor as std::str::FromStr>::from_str(val)
+ .map_err(|x| format!("{}", x))?,
+ ),
+ "changelog_index" => intermediate_rep.changelog_index.push(
+ <i64 as std::str::FromStr>::from_str(val).map_err(|x| format!("{}", x))?,
+ ),
"created" => intermediate_rep.created.push(
- chrono::DateTime::<chrono::Utc>::from_str(val)
+ <chrono::DateTime<chrono::Utc> as std::str::FromStr>::from_str(val)
.map_err(|x| format!("{}", x))?,
),
"submitted" => intermediate_rep.submitted.push(
- chrono::DateTime::<chrono::Utc>::from_str(val)
+ <chrono::DateTime<chrono::Utc> as std::str::FromStr>::from_str(val)
+ .map_err(|x| format!("{}", x))?,
+ ),
+ "description" => intermediate_rep.description.push(
+ <String as std::str::FromStr>::from_str(val)
.map_err(|x| format!("{}", x))?,
),
- "description" => intermediate_rep
- .description
- .push(String::from_str(val).map_err(|x| format!("{}", x))?),
"extra" => {
return std::result::Result::Err(
"Parsing a container in this style is not supported in Editgroup"
@@ -1821,9 +1812,10 @@ impl std::str::FromStr for Editgroup {
.to_string(),
)
}
- "edits" => intermediate_rep
- .edits
- .push(models::EditgroupEdits::from_str(val).map_err(|x| format!("{}", x))?),
+ "edits" => intermediate_rep.edits.push(
+ <models::EditgroupEdits as std::str::FromStr>::from_str(val)
+ .map_err(|x| format!("{}", x))?,
+ ),
_ => {
return std::result::Result::Err(
"Unexpected key while parsing Editgroup".to_string(),
@@ -1852,22 +1844,20 @@ impl std::str::FromStr for Editgroup {
}
}
-// Methods for converting between header::IntoHeaderValue<EditgroupAnnotation> and hyper::header::HeaderValue
+// Methods for converting between header::IntoHeaderValue<Editgroup> and hyper::header::HeaderValue
#[cfg(any(feature = "client", feature = "server"))]
-impl std::convert::TryFrom<header::IntoHeaderValue<EditgroupAnnotation>>
- for hyper::header::HeaderValue
-{
+impl std::convert::TryFrom<header::IntoHeaderValue<Editgroup>> for hyper::header::HeaderValue {
type Error = String;
fn try_from(
- hdr_value: header::IntoHeaderValue<EditgroupAnnotation>,
+ hdr_value: header::IntoHeaderValue<Editgroup>,
) -> std::result::Result<Self, Self::Error> {
let hdr_value = hdr_value.to_string();
match hyper::header::HeaderValue::from_str(&hdr_value) {
std::result::Result::Ok(value) => std::result::Result::Ok(value),
std::result::Result::Err(e) => std::result::Result::Err(format!(
- "Invalid header value for EditgroupAnnotation - value: {} is invalid {}",
+ "Invalid header value for Editgroup - value: {} is invalid {}",
hdr_value, e
)),
}
@@ -1875,20 +1865,18 @@ impl std::convert::TryFrom<header::IntoHeaderValue<EditgroupAnnotation>>
}
#[cfg(any(feature = "client", feature = "server"))]
-impl std::convert::TryFrom<hyper::header::HeaderValue>
- for header::IntoHeaderValue<EditgroupAnnotation>
-{
+impl std::convert::TryFrom<hyper::header::HeaderValue> for header::IntoHeaderValue<Editgroup> {
type Error = String;
fn try_from(hdr_value: hyper::header::HeaderValue) -> std::result::Result<Self, Self::Error> {
match hdr_value.to_str() {
std::result::Result::Ok(value) => {
- match <EditgroupAnnotation as std::str::FromStr>::from_str(value) {
+ match <Editgroup as std::str::FromStr>::from_str(value) {
std::result::Result::Ok(value) => {
std::result::Result::Ok(header::IntoHeaderValue(value))
}
std::result::Result::Err(err) => std::result::Result::Err(format!(
- "Unable to convert header value '{}' into EditgroupAnnotation - {}",
+ "Unable to convert header value '{}' into Editgroup - {}",
value, err
)),
}
@@ -2027,25 +2015,30 @@ impl std::str::FromStr for EditgroupAnnotation {
if let Some(key) = key_result {
match key {
- "annotation_id" => intermediate_rep
- .annotation_id
- .push(String::from_str(val).map_err(|x| format!("{}", x))?),
- "editgroup_id" => intermediate_rep
- .editgroup_id
- .push(String::from_str(val).map_err(|x| format!("{}", x))?),
- "editor_id" => intermediate_rep
- .editor_id
- .push(String::from_str(val).map_err(|x| format!("{}", x))?),
- "editor" => intermediate_rep
- .editor
- .push(models::Editor::from_str(val).map_err(|x| format!("{}", x))?),
+ "annotation_id" => intermediate_rep.annotation_id.push(
+ <String as std::str::FromStr>::from_str(val)
+ .map_err(|x| format!("{}", x))?,
+ ),
+ "editgroup_id" => intermediate_rep.editgroup_id.push(
+ <String as std::str::FromStr>::from_str(val)
+ .map_err(|x| format!("{}", x))?,
+ ),
+ "editor_id" => intermediate_rep.editor_id.push(
+ <String as std::str::FromStr>::from_str(val)
+ .map_err(|x| format!("{}", x))?,
+ ),
+ "editor" => intermediate_rep.editor.push(
+ <models::Editor as std::str::FromStr>::from_str(val)
+ .map_err(|x| format!("{}", x))?,
+ ),
"created" => intermediate_rep.created.push(
- chrono::DateTime::<chrono::Utc>::from_str(val)
+ <chrono::DateTime<chrono::Utc> as std::str::FromStr>::from_str(val)
+ .map_err(|x| format!("{}", x))?,
+ ),
+ "comment_markdown" => intermediate_rep.comment_markdown.push(
+ <String as std::str::FromStr>::from_str(val)
.map_err(|x| format!("{}", x))?,
),
- "comment_markdown" => intermediate_rep
- .comment_markdown
- .push(String::from_str(val).map_err(|x| format!("{}", x))?),
"extra" => return std::result::Result::Err(
"Parsing a container in this style is not supported in EditgroupAnnotation"
.to_string(),
@@ -2075,21 +2068,22 @@ impl std::str::FromStr for EditgroupAnnotation {
}
}
-/// Only included in GET responses, and not in all contexts. Do not include this field in PUT or POST requests.
-// Methods for converting between header::IntoHeaderValue<EditgroupEdits> and hyper::header::HeaderValue
+// Methods for converting between header::IntoHeaderValue<EditgroupAnnotation> and hyper::header::HeaderValue
#[cfg(any(feature = "client", feature = "server"))]
-impl std::convert::TryFrom<header::IntoHeaderValue<EditgroupEdits>> for hyper::header::HeaderValue {
+impl std::convert::TryFrom<header::IntoHeaderValue<EditgroupAnnotation>>
+ for hyper::header::HeaderValue
+{
type Error = String;
fn try_from(
- hdr_value: header::IntoHeaderValue<EditgroupEdits>,
+ hdr_value: header::IntoHeaderValue<EditgroupAnnotation>,
) -> std::result::Result<Self, Self::Error> {
let hdr_value = hdr_value.to_string();
match hyper::header::HeaderValue::from_str(&hdr_value) {
std::result::Result::Ok(value) => std::result::Result::Ok(value),
std::result::Result::Err(e) => std::result::Result::Err(format!(
- "Invalid header value for EditgroupEdits - value: {} is invalid {}",
+ "Invalid header value for EditgroupAnnotation - value: {} is invalid {}",
hdr_value, e
)),
}
@@ -2097,18 +2091,20 @@ impl std::convert::TryFrom<header::IntoHeaderValue<EditgroupEdits>> for hyper::h
}
#[cfg(any(feature = "client", feature = "server"))]
-impl std::convert::TryFrom<hyper::header::HeaderValue> for header::IntoHeaderValue<EditgroupEdits> {
+impl std::convert::TryFrom<hyper::header::HeaderValue>
+ for header::IntoHeaderValue<EditgroupAnnotation>
+{
type Error = String;
fn try_from(hdr_value: hyper::header::HeaderValue) -> std::result::Result<Self, Self::Error> {
match hdr_value.to_str() {
std::result::Result::Ok(value) => {
- match <EditgroupEdits as std::str::FromStr>::from_str(value) {
+ match <EditgroupAnnotation as std::str::FromStr>::from_str(value) {
std::result::Result::Ok(value) => {
std::result::Result::Ok(header::IntoHeaderValue(value))
}
std::result::Result::Err(err) => std::result::Result::Err(format!(
- "Unable to convert header value '{}' into EditgroupEdits - {}",
+ "Unable to convert header value '{}' into EditgroupAnnotation - {}",
value, err
)),
}
@@ -2121,6 +2117,7 @@ impl std::convert::TryFrom<hyper::header::HeaderValue> for header::IntoHeaderVal
}
}
+/// Only included in GET responses, and not in all contexts. Do not include this field in PUT or POST requests.
#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
#[cfg_attr(feature = "conversion", derive(frunk::LabelledGeneric))]
pub struct EditgroupEdits {
@@ -2295,20 +2292,20 @@ impl std::str::FromStr for EditgroupEdits {
}
}
-// Methods for converting between header::IntoHeaderValue<Editor> and hyper::header::HeaderValue
+// Methods for converting between header::IntoHeaderValue<EditgroupEdits> and hyper::header::HeaderValue
#[cfg(any(feature = "client", feature = "server"))]
-impl std::convert::TryFrom<header::IntoHeaderValue<Editor>> for hyper::header::HeaderValue {
+impl std::convert::TryFrom<header::IntoHeaderValue<EditgroupEdits>> for hyper::header::HeaderValue {
type Error = String;
fn try_from(
- hdr_value: header::IntoHeaderValue<Editor>,
+ hdr_value: header::IntoHeaderValue<EditgroupEdits>,
) -> std::result::Result<Self, Self::Error> {
let hdr_value = hdr_value.to_string();
match hyper::header::HeaderValue::from_str(&hdr_value) {
std::result::Result::Ok(value) => std::result::Result::Ok(value),
std::result::Result::Err(e) => std::result::Result::Err(format!(
- "Invalid header value for Editor - value: {} is invalid {}",
+ "Invalid header value for EditgroupEdits - value: {} is invalid {}",
hdr_value, e
)),
}
@@ -2316,18 +2313,18 @@ impl std::convert::TryFrom<header::IntoHeaderValue<Editor>> for hyper::header::H
}
#[cfg(any(feature = "client", feature = "server"))]
-impl std::convert::TryFrom<hyper::header::HeaderValue> for header::IntoHeaderValue<Editor> {
+impl std::convert::TryFrom<hyper::header::HeaderValue> for header::IntoHeaderValue<EditgroupEdits> {
type Error = String;
fn try_from(hdr_value: hyper::header::HeaderValue) -> std::result::Result<Self, Self::Error> {
match hdr_value.to_str() {
std::result::Result::Ok(value) => {
- match <Editor as std::str::FromStr>::from_str(value) {
+ match <EditgroupEdits as std::str::FromStr>::from_str(value) {
std::result::Result::Ok(value) => {
std::result::Result::Ok(header::IntoHeaderValue(value))
}
std::result::Result::Err(err) => std::result::Result::Err(format!(
- "Unable to convert header value '{}' into Editor - {}",
+ "Unable to convert header value '{}' into EditgroupEdits - {}",
value, err
)),
}
@@ -2449,21 +2446,23 @@ impl std::str::FromStr for Editor {
if let Some(key) = key_result {
match key {
- "editor_id" => intermediate_rep
- .editor_id
- .push(String::from_str(val).map_err(|x| format!("{}", x))?),
- "username" => intermediate_rep
- .username
- .push(String::from_str(val).map_err(|x| format!("{}", x))?),
- "is_admin" => intermediate_rep
- .is_admin
- .push(bool::from_str(val).map_err(|x| format!("{}", x))?),
- "is_bot" => intermediate_rep
- .is_bot
- .push(bool::from_str(val).map_err(|x| format!("{}", x))?),
- "is_active" => intermediate_rep
- .is_active
- .push(bool::from_str(val).map_err(|x| format!("{}", x))?),
+ "editor_id" => intermediate_rep.editor_id.push(
+ <String as std::str::FromStr>::from_str(val)
+ .map_err(|x| format!("{}", x))?,
+ ),
+ "username" => intermediate_rep.username.push(
+ <String as std::str::FromStr>::from_str(val)
+ .map_err(|x| format!("{}", x))?,
+ ),
+ "is_admin" => intermediate_rep.is_admin.push(
+ <bool as std::str::FromStr>::from_str(val).map_err(|x| format!("{}", x))?,
+ ),
+ "is_bot" => intermediate_rep.is_bot.push(
+ <bool as std::str::FromStr>::from_str(val).map_err(|x| format!("{}", x))?,
+ ),
+ "is_active" => intermediate_rep.is_active.push(
+ <bool as std::str::FromStr>::from_str(val).map_err(|x| format!("{}", x))?,
+ ),
_ => {
return std::result::Result::Err(
"Unexpected key while parsing Editor".to_string(),
@@ -2491,20 +2490,20 @@ impl std::str::FromStr for Editor {
}
}
-// Methods for converting between header::IntoHeaderValue<EntityEdit> and hyper::header::HeaderValue
+// Methods for converting between header::IntoHeaderValue<Editor> and hyper::header::HeaderValue
#[cfg(any(feature = "client", feature = "server"))]
-impl std::convert::TryFrom<header::IntoHeaderValue<EntityEdit>> for hyper::header::HeaderValue {
+impl std::convert::TryFrom<header::IntoHeaderValue<Editor>> for hyper::header::HeaderValue {
type Error = String;
fn try_from(
- hdr_value: header::IntoHeaderValue<EntityEdit>,
+ hdr_value: header::IntoHeaderValue<Editor>,
) -> std::result::Result<Self, Self::Error> {
let hdr_value = hdr_value.to_string();
match hyper::header::HeaderValue::from_str(&hdr_value) {
std::result::Result::Ok(value) => std::result::Result::Ok(value),
std::result::Result::Err(e) => std::result::Result::Err(format!(
- "Invalid header value for EntityEdit - value: {} is invalid {}",
+ "Invalid header value for Editor - value: {} is invalid {}",
hdr_value, e
)),
}
@@ -2512,18 +2511,18 @@ impl std::convert::TryFrom<header::IntoHeaderValue<EntityEdit>> for hyper::heade
}
#[cfg(any(feature = "client", feature = "server"))]
-impl std::convert::TryFrom<hyper::header::HeaderValue> for header::IntoHeaderValue<EntityEdit> {
+impl std::convert::TryFrom<hyper::header::HeaderValue> for header::IntoHeaderValue<Editor> {
type Error = String;
fn try_from(hdr_value: hyper::header::HeaderValue) -> std::result::Result<Self, Self::Error> {
match hdr_value.to_str() {
std::result::Result::Ok(value) => {
- match <EntityEdit as std::str::FromStr>::from_str(value) {
+ match <Editor as std::str::FromStr>::from_str(value) {
std::result::Result::Ok(value) => {
std::result::Result::Ok(header::IntoHeaderValue(value))
}
std::result::Result::Err(err) => std::result::Result::Err(format!(
- "Unable to convert header value '{}' into EntityEdit - {}",
+ "Unable to convert header value '{}' into Editor - {}",
value, err
)),
}
@@ -2660,24 +2659,30 @@ impl std::str::FromStr for EntityEdit {
if let Some(key) = key_result {
match key {
- "edit_id" => intermediate_rep
- .edit_id
- .push(String::from_str(val).map_err(|x| format!("{}", x))?),
- "ident" => intermediate_rep
- .ident
- .push(String::from_str(val).map_err(|x| format!("{}", x))?),
- "revision" => intermediate_rep
- .revision
- .push(String::from_str(val).map_err(|x| format!("{}", x))?),
- "prev_revision" => intermediate_rep
- .prev_revision
- .push(String::from_str(val).map_err(|x| format!("{}", x))?),
- "redirect_ident" => intermediate_rep
- .redirect_ident
- .push(String::from_str(val).map_err(|x| format!("{}", x))?),
- "editgroup_id" => intermediate_rep
- .editgroup_id
- .push(String::from_str(val).map_err(|x| format!("{}", x))?),
+ "edit_id" => intermediate_rep.edit_id.push(
+ <String as std::str::FromStr>::from_str(val)
+ .map_err(|x| format!("{}", x))?,
+ ),
+ "ident" => intermediate_rep.ident.push(
+ <String as std::str::FromStr>::from_str(val)
+ .map_err(|x| format!("{}", x))?,
+ ),
+ "revision" => intermediate_rep.revision.push(
+ <String as std::str::FromStr>::from_str(val)
+ .map_err(|x| format!("{}", x))?,
+ ),
+ "prev_revision" => intermediate_rep.prev_revision.push(
+ <String as std::str::FromStr>::from_str(val)
+ .map_err(|x| format!("{}", x))?,
+ ),
+ "redirect_ident" => intermediate_rep.redirect_ident.push(
+ <String as std::str::FromStr>::from_str(val)
+ .map_err(|x| format!("{}", x))?,
+ ),
+ "editgroup_id" => intermediate_rep.editgroup_id.push(
+ <String as std::str::FromStr>::from_str(val)
+ .map_err(|x| format!("{}", x))?,
+ ),
"extra" => {
return std::result::Result::Err(
"Parsing a container in this style is not supported in EntityEdit"
@@ -2721,22 +2726,20 @@ impl std::str::FromStr for EntityEdit {
}
}
-// Methods for converting between header::IntoHeaderValue<EntityHistoryEntry> and hyper::header::HeaderValue
+// Methods for converting between header::IntoHeaderValue<EntityEdit> and hyper::header::HeaderValue
#[cfg(any(feature = "client", feature = "server"))]
-impl std::convert::TryFrom<header::IntoHeaderValue<EntityHistoryEntry>>
- for hyper::header::HeaderValue
-{
+impl std::convert::TryFrom<header::IntoHeaderValue<EntityEdit>> for hyper::header::HeaderValue {
type Error = String;
fn try_from(
- hdr_value: header::IntoHeaderValue<EntityHistoryEntry>,
+ hdr_value: header::IntoHeaderValue<EntityEdit>,
) -> std::result::Result<Self, Self::Error> {
let hdr_value = hdr_value.to_string();
match hyper::header::HeaderValue::from_str(&hdr_value) {
std::result::Result::Ok(value) => std::result::Result::Ok(value),
std::result::Result::Err(e) => std::result::Result::Err(format!(
- "Invalid header value for EntityHistoryEntry - value: {} is invalid {}",
+ "Invalid header value for EntityEdit - value: {} is invalid {}",
hdr_value, e
)),
}
@@ -2744,20 +2747,18 @@ impl std::convert::TryFrom<header::IntoHeaderValue<EntityHistoryEntry>>
}
#[cfg(any(feature = "client", feature = "server"))]
-impl std::convert::TryFrom<hyper::header::HeaderValue>
- for header::IntoHeaderValue<EntityHistoryEntry>
-{
+impl std::convert::TryFrom<hyper::header::HeaderValue> for header::IntoHeaderValue<EntityEdit> {
type Error = String;
fn try_from(hdr_value: hyper::header::HeaderValue) -> std::result::Result<Self, Self::Error> {
match hdr_value.to_str() {
std::result::Result::Ok(value) => {
- match <EntityHistoryEntry as std::str::FromStr>::from_str(value) {
+ match <EntityEdit as std::str::FromStr>::from_str(value) {
std::result::Result::Ok(value) => {
std::result::Result::Ok(header::IntoHeaderValue(value))
}
std::result::Result::Err(err) => std::result::Result::Err(format!(
- "Unable to convert header value '{}' into EntityHistoryEntry - {}",
+ "Unable to convert header value '{}' into EntityEdit - {}",
value, err
)),
}
@@ -2846,15 +2847,18 @@ impl std::str::FromStr for EntityHistoryEntry {
if let Some(key) = key_result {
match key {
- "edit" => intermediate_rep
- .edit
- .push(models::EntityEdit::from_str(val).map_err(|x| format!("{}", x))?),
- "editgroup" => intermediate_rep
- .editgroup
- .push(models::Editgroup::from_str(val).map_err(|x| format!("{}", x))?),
- "changelog_entry" => intermediate_rep
- .changelog_entry
- .push(models::ChangelogEntry::from_str(val).map_err(|x| format!("{}", x))?),
+ "edit" => intermediate_rep.edit.push(
+ <models::EntityEdit as std::str::FromStr>::from_str(val)
+ .map_err(|x| format!("{}", x))?,
+ ),
+ "editgroup" => intermediate_rep.editgroup.push(
+ <models::Editgroup as std::str::FromStr>::from_str(val)
+ .map_err(|x| format!("{}", x))?,
+ ),
+ "changelog_entry" => intermediate_rep.changelog_entry.push(
+ <models::ChangelogEntry as std::str::FromStr>::from_str(val)
+ .map_err(|x| format!("{}", x))?,
+ ),
_ => {
return std::result::Result::Err(
"Unexpected key while parsing EntityHistoryEntry".to_string(),
@@ -2888,20 +2892,22 @@ impl std::str::FromStr for EntityHistoryEntry {
}
}
-// Methods for converting between header::IntoHeaderValue<ErrorResponse> and hyper::header::HeaderValue
+// Methods for converting between header::IntoHeaderValue<EntityHistoryEntry> and hyper::header::HeaderValue
#[cfg(any(feature = "client", feature = "server"))]
-impl std::convert::TryFrom<header::IntoHeaderValue<ErrorResponse>> for hyper::header::HeaderValue {
+impl std::convert::TryFrom<header::IntoHeaderValue<EntityHistoryEntry>>
+ for hyper::header::HeaderValue
+{
type Error = String;
fn try_from(
- hdr_value: header::IntoHeaderValue<ErrorResponse>,
+ hdr_value: header::IntoHeaderValue<EntityHistoryEntry>,
) -> std::result::Result<Self, Self::Error> {
let hdr_value = hdr_value.to_string();
match hyper::header::HeaderValue::from_str(&hdr_value) {
std::result::Result::Ok(value) => std::result::Result::Ok(value),
std::result::Result::Err(e) => std::result::Result::Err(format!(
- "Invalid header value for ErrorResponse - value: {} is invalid {}",
+ "Invalid header value for EntityHistoryEntry - value: {} is invalid {}",
hdr_value, e
)),
}
@@ -2909,18 +2915,20 @@ impl std::convert::TryFrom<header::IntoHeaderValue<ErrorResponse>> for hyper::he
}
#[cfg(any(feature = "client", feature = "server"))]
-impl std::convert::TryFrom<hyper::header::HeaderValue> for header::IntoHeaderValue<ErrorResponse> {
+impl std::convert::TryFrom<hyper::header::HeaderValue>
+ for header::IntoHeaderValue<EntityHistoryEntry>
+{
type Error = String;
fn try_from(hdr_value: hyper::header::HeaderValue) -> std::result::Result<Self, Self::Error> {
match hdr_value.to_str() {
std::result::Result::Ok(value) => {
- match <ErrorResponse as std::str::FromStr>::from_str(value) {
+ match <EntityHistoryEntry as std::str::FromStr>::from_str(value) {
std::result::Result::Ok(value) => {
std::result::Result::Ok(header::IntoHeaderValue(value))
}
std::result::Result::Err(err) => std::result::Result::Err(format!(
- "Unable to convert header value '{}' into ErrorResponse - {}",
+ "Unable to convert header value '{}' into EntityHistoryEntry - {}",
value, err
)),
}
@@ -3009,15 +3017,17 @@ impl std::str::FromStr for ErrorResponse {
if let Some(key) = key_result {
match key {
- "success" => intermediate_rep
- .success
- .push(bool::from_str(val).map_err(|x| format!("{}", x))?),
- "error" => intermediate_rep
- .error
- .push(String::from_str(val).map_err(|x| format!("{}", x))?),
- "message" => intermediate_rep
- .message
- .push(String::from_str(val).map_err(|x| format!("{}", x))?),
+ "success" => intermediate_rep.success.push(
+ <bool as std::str::FromStr>::from_str(val).map_err(|x| format!("{}", x))?,
+ ),
+ "error" => intermediate_rep.error.push(
+ <String as std::str::FromStr>::from_str(val)
+ .map_err(|x| format!("{}", x))?,
+ ),
+ "message" => intermediate_rep.message.push(
+ <String as std::str::FromStr>::from_str(val)
+ .map_err(|x| format!("{}", x))?,
+ ),
_ => {
return std::result::Result::Err(
"Unexpected key while parsing ErrorResponse".to_string(),
@@ -3051,20 +3061,20 @@ impl std::str::FromStr for ErrorResponse {
}
}
-// Methods for converting between header::IntoHeaderValue<FileAutoBatch> and hyper::header::HeaderValue
+// Methods for converting between header::IntoHeaderValue<ErrorResponse> and hyper::header::HeaderValue
#[cfg(any(feature = "client", feature = "server"))]
-impl std::convert::TryFrom<header::IntoHeaderValue<FileAutoBatch>> for hyper::header::HeaderValue {
+impl std::convert::TryFrom<header::IntoHeaderValue<ErrorResponse>> for hyper::header::HeaderValue {
type Error = String;
fn try_from(
- hdr_value: header::IntoHeaderValue<FileAutoBatch>,
+ hdr_value: header::IntoHeaderValue<ErrorResponse>,
) -> std::result::Result<Self, Self::Error> {
let hdr_value = hdr_value.to_string();
match hyper::header::HeaderValue::from_str(&hdr_value) {
std::result::Result::Ok(value) => std::result::Result::Ok(value),
std::result::Result::Err(e) => std::result::Result::Err(format!(
- "Invalid header value for FileAutoBatch - value: {} is invalid {}",
+ "Invalid header value for ErrorResponse - value: {} is invalid {}",
hdr_value, e
)),
}
@@ -3072,18 +3082,18 @@ impl std::convert::TryFrom<header::IntoHeaderValue<FileAutoBatch>> for hyper::he
}
#[cfg(any(feature = "client", feature = "server"))]
-impl std::convert::TryFrom<hyper::header::HeaderValue> for header::IntoHeaderValue<FileAutoBatch> {
+impl std::convert::TryFrom<hyper::header::HeaderValue> for header::IntoHeaderValue<ErrorResponse> {
type Error = String;
fn try_from(hdr_value: hyper::header::HeaderValue) -> std::result::Result<Self, Self::Error> {
match hdr_value.to_str() {
std::result::Result::Ok(value) => {
- match <FileAutoBatch as std::str::FromStr>::from_str(value) {
+ match <ErrorResponse as std::str::FromStr>::from_str(value) {
std::result::Result::Ok(value) => {
std::result::Result::Ok(header::IntoHeaderValue(value))
}
std::result::Result::Err(err) => std::result::Result::Err(format!(
- "Unable to convert header value '{}' into FileAutoBatch - {}",
+ "Unable to convert header value '{}' into ErrorResponse - {}",
value, err
)),
}
@@ -3164,9 +3174,10 @@ impl std::str::FromStr for FileAutoBatch {
if let Some(key) = key_result {
match key {
- "editgroup" => intermediate_rep
- .editgroup
- .push(models::Editgroup::from_str(val).map_err(|x| format!("{}", x))?),
+ "editgroup" => intermediate_rep.editgroup.push(
+ <models::Editgroup as std::str::FromStr>::from_str(val)
+ .map_err(|x| format!("{}", x))?,
+ ),
"entity_list" => {
return std::result::Result::Err(
"Parsing a container in this style is not supported in FileAutoBatch"
@@ -3201,20 +3212,20 @@ impl std::str::FromStr for FileAutoBatch {
}
}
-// Methods for converting between header::IntoHeaderValue<FileEntity> and hyper::header::HeaderValue
+// Methods for converting between header::IntoHeaderValue<FileAutoBatch> and hyper::header::HeaderValue
#[cfg(any(feature = "client", feature = "server"))]
-impl std::convert::TryFrom<header::IntoHeaderValue<FileEntity>> for hyper::header::HeaderValue {
+impl std::convert::TryFrom<header::IntoHeaderValue<FileAutoBatch>> for hyper::header::HeaderValue {
type Error = String;
fn try_from(
- hdr_value: header::IntoHeaderValue<FileEntity>,
+ hdr_value: header::IntoHeaderValue<FileAutoBatch>,
) -> std::result::Result<Self, Self::Error> {
let hdr_value = hdr_value.to_string();
match hyper::header::HeaderValue::from_str(&hdr_value) {
std::result::Result::Ok(value) => std::result::Result::Ok(value),
std::result::Result::Err(e) => std::result::Result::Err(format!(
- "Invalid header value for FileEntity - value: {} is invalid {}",
+ "Invalid header value for FileAutoBatch - value: {} is invalid {}",
hdr_value, e
)),
}
@@ -3222,18 +3233,18 @@ impl std::convert::TryFrom<header::IntoHeaderValue<FileEntity>> for hyper::heade
}
#[cfg(any(feature = "client", feature = "server"))]
-impl std::convert::TryFrom<hyper::header::HeaderValue> for header::IntoHeaderValue<FileEntity> {
+impl std::convert::TryFrom<hyper::header::HeaderValue> for header::IntoHeaderValue<FileAutoBatch> {
type Error = String;
fn try_from(hdr_value: hyper::header::HeaderValue) -> std::result::Result<Self, Self::Error> {
match hdr_value.to_str() {
std::result::Result::Ok(value) => {
- match <FileEntity as std::str::FromStr>::from_str(value) {
+ match <FileAutoBatch as std::str::FromStr>::from_str(value) {
std::result::Result::Ok(value) => {
std::result::Result::Ok(header::IntoHeaderValue(value))
}
std::result::Result::Err(err) => std::result::Result::Err(format!(
- "Unable to convert header value '{}' into FileEntity - {}",
+ "Unable to convert header value '{}' into FileAutoBatch - {}",
value, err
)),
}
@@ -3472,18 +3483,22 @@ impl std::str::FromStr for FileEntity {
if let Some(key) = key_result {
match key {
- "state" => intermediate_rep
- .state
- .push(String::from_str(val).map_err(|x| format!("{}", x))?),
- "ident" => intermediate_rep
- .ident
- .push(String::from_str(val).map_err(|x| format!("{}", x))?),
- "revision" => intermediate_rep
- .revision
- .push(String::from_str(val).map_err(|x| format!("{}", x))?),
- "redirect" => intermediate_rep
- .redirect
- .push(String::from_str(val).map_err(|x| format!("{}", x))?),
+ "state" => intermediate_rep.state.push(
+ <String as std::str::FromStr>::from_str(val)
+ .map_err(|x| format!("{}", x))?,
+ ),
+ "ident" => intermediate_rep.ident.push(
+ <String as std::str::FromStr>::from_str(val)
+ .map_err(|x| format!("{}", x))?,
+ ),
+ "revision" => intermediate_rep.revision.push(
+ <String as std::str::FromStr>::from_str(val)
+ .map_err(|x| format!("{}", x))?,
+ ),
+ "redirect" => intermediate_rep.redirect.push(
+ <String as std::str::FromStr>::from_str(val)
+ .map_err(|x| format!("{}", x))?,
+ ),
"extra" => {
return std::result::Result::Err(
"Parsing a container in this style is not supported in FileEntity"
@@ -3496,30 +3511,35 @@ impl std::str::FromStr for FileEntity {
.to_string(),
)
}
- "size" => intermediate_rep
- .size
- .push(i64::from_str(val).map_err(|x| format!("{}", x))?),
- "md5" => intermediate_rep
- .md5
- .push(String::from_str(val).map_err(|x| format!("{}", x))?),
- "sha1" => intermediate_rep
- .sha1
- .push(String::from_str(val).map_err(|x| format!("{}", x))?),
- "sha256" => intermediate_rep
- .sha256
- .push(String::from_str(val).map_err(|x| format!("{}", x))?),
+ "size" => intermediate_rep.size.push(
+ <i64 as std::str::FromStr>::from_str(val).map_err(|x| format!("{}", x))?,
+ ),
+ "md5" => intermediate_rep.md5.push(
+ <String as std::str::FromStr>::from_str(val)
+ .map_err(|x| format!("{}", x))?,
+ ),
+ "sha1" => intermediate_rep.sha1.push(
+ <String as std::str::FromStr>::from_str(val)
+ .map_err(|x| format!("{}", x))?,
+ ),
+ "sha256" => intermediate_rep.sha256.push(
+ <String as std::str::FromStr>::from_str(val)
+ .map_err(|x| format!("{}", x))?,
+ ),
"urls" => {
return std::result::Result::Err(
"Parsing a container in this style is not supported in FileEntity"
.to_string(),
)
}
- "mimetype" => intermediate_rep
- .mimetype
- .push(String::from_str(val).map_err(|x| format!("{}", x))?),
- "content_scope" => intermediate_rep
- .content_scope
- .push(String::from_str(val).map_err(|x| format!("{}", x))?),
+ "mimetype" => intermediate_rep.mimetype.push(
+ <String as std::str::FromStr>::from_str(val)
+ .map_err(|x| format!("{}", x))?,
+ ),
+ "content_scope" => intermediate_rep.content_scope.push(
+ <String as std::str::FromStr>::from_str(val)
+ .map_err(|x| format!("{}", x))?,
+ ),
"release_ids" => {
return std::result::Result::Err(
"Parsing a container in this style is not supported in FileEntity"
@@ -3565,20 +3585,20 @@ impl std::str::FromStr for FileEntity {
}
}
-// Methods for converting between header::IntoHeaderValue<FileUrl> and hyper::header::HeaderValue
+// Methods for converting between header::IntoHeaderValue<FileEntity> and hyper::header::HeaderValue
#[cfg(any(feature = "client", feature = "server"))]
-impl std::convert::TryFrom<header::IntoHeaderValue<FileUrl>> for hyper::header::HeaderValue {
+impl std::convert::TryFrom<header::IntoHeaderValue<FileEntity>> for hyper::header::HeaderValue {
type Error = String;
fn try_from(
- hdr_value: header::IntoHeaderValue<FileUrl>,
+ hdr_value: header::IntoHeaderValue<FileEntity>,
) -> std::result::Result<Self, Self::Error> {
let hdr_value = hdr_value.to_string();
match hyper::header::HeaderValue::from_str(&hdr_value) {
std::result::Result::Ok(value) => std::result::Result::Ok(value),
std::result::Result::Err(e) => std::result::Result::Err(format!(
- "Invalid header value for FileUrl - value: {} is invalid {}",
+ "Invalid header value for FileEntity - value: {} is invalid {}",
hdr_value, e
)),
}
@@ -3586,18 +3606,18 @@ impl std::convert::TryFrom<header::IntoHeaderValue<FileUrl>> for hyper::header::
}
#[cfg(any(feature = "client", feature = "server"))]
-impl std::convert::TryFrom<hyper::header::HeaderValue> for header::IntoHeaderValue<FileUrl> {
+impl std::convert::TryFrom<hyper::header::HeaderValue> for header::IntoHeaderValue<FileEntity> {
type Error = String;
fn try_from(hdr_value: hyper::header::HeaderValue) -> std::result::Result<Self, Self::Error> {
match hdr_value.to_str() {
std::result::Result::Ok(value) => {
- match <FileUrl as std::str::FromStr>::from_str(value) {
+ match <FileEntity as std::str::FromStr>::from_str(value) {
std::result::Result::Ok(value) => {
std::result::Result::Ok(header::IntoHeaderValue(value))
}
std::result::Result::Err(err) => std::result::Result::Err(format!(
- "Unable to convert header value '{}' into FileUrl - {}",
+ "Unable to convert header value '{}' into FileEntity - {}",
value, err
)),
}
@@ -3677,12 +3697,14 @@ impl std::str::FromStr for FileUrl {
if let Some(key) = key_result {
match key {
- "url" => intermediate_rep
- .url
- .push(String::from_str(val).map_err(|x| format!("{}", x))?),
- "rel" => intermediate_rep
- .rel
- .push(String::from_str(val).map_err(|x| format!("{}", x))?),
+ "url" => intermediate_rep.url.push(
+ <String as std::str::FromStr>::from_str(val)
+ .map_err(|x| format!("{}", x))?,
+ ),
+ "rel" => intermediate_rep.rel.push(
+ <String as std::str::FromStr>::from_str(val)
+ .map_err(|x| format!("{}", x))?,
+ ),
_ => {
return std::result::Result::Err(
"Unexpected key while parsing FileUrl".to_string(),
@@ -3711,22 +3733,20 @@ impl std::str::FromStr for FileUrl {
}
}
-// Methods for converting between header::IntoHeaderValue<FilesetAutoBatch> and hyper::header::HeaderValue
+// Methods for converting between header::IntoHeaderValue<FileUrl> and hyper::header::HeaderValue
#[cfg(any(feature = "client", feature = "server"))]
-impl std::convert::TryFrom<header::IntoHeaderValue<FilesetAutoBatch>>
- for hyper::header::HeaderValue
-{
+impl std::convert::TryFrom<header::IntoHeaderValue<FileUrl>> for hyper::header::HeaderValue {
type Error = String;
fn try_from(
- hdr_value: header::IntoHeaderValue<FilesetAutoBatch>,
+ hdr_value: header::IntoHeaderValue<FileUrl>,
) -> std::result::Result<Self, Self::Error> {
let hdr_value = hdr_value.to_string();
match hyper::header::HeaderValue::from_str(&hdr_value) {
std::result::Result::Ok(value) => std::result::Result::Ok(value),
std::result::Result::Err(e) => std::result::Result::Err(format!(
- "Invalid header value for FilesetAutoBatch - value: {} is invalid {}",
+ "Invalid header value for FileUrl - value: {} is invalid {}",
hdr_value, e
)),
}
@@ -3734,20 +3754,18 @@ impl std::convert::TryFrom<header::IntoHeaderValue<FilesetAutoBatch>>
}
#[cfg(any(feature = "client", feature = "server"))]
-impl std::convert::TryFrom<hyper::header::HeaderValue>
- for header::IntoHeaderValue<FilesetAutoBatch>
-{
+impl std::convert::TryFrom<hyper::header::HeaderValue> for header::IntoHeaderValue<FileUrl> {
type Error = String;
fn try_from(hdr_value: hyper::header::HeaderValue) -> std::result::Result<Self, Self::Error> {
match hdr_value.to_str() {
std::result::Result::Ok(value) => {
- match <FilesetAutoBatch as std::str::FromStr>::from_str(value) {
+ match <FileUrl as std::str::FromStr>::from_str(value) {
std::result::Result::Ok(value) => {
std::result::Result::Ok(header::IntoHeaderValue(value))
}
std::result::Result::Err(err) => std::result::Result::Err(format!(
- "Unable to convert header value '{}' into FilesetAutoBatch - {}",
+ "Unable to convert header value '{}' into FileUrl - {}",
value, err
)),
}
@@ -3828,9 +3846,10 @@ impl std::str::FromStr for FilesetAutoBatch {
if let Some(key) = key_result {
match key {
- "editgroup" => intermediate_rep
- .editgroup
- .push(models::Editgroup::from_str(val).map_err(|x| format!("{}", x))?),
+ "editgroup" => intermediate_rep.editgroup.push(
+ <models::Editgroup as std::str::FromStr>::from_str(val)
+ .map_err(|x| format!("{}", x))?,
+ ),
"entity_list" => return std::result::Result::Err(
"Parsing a container in this style is not supported in FilesetAutoBatch"
.to_string(),
@@ -3863,20 +3882,22 @@ impl std::str::FromStr for FilesetAutoBatch {
}
}
-// Methods for converting between header::IntoHeaderValue<FilesetEntity> and hyper::header::HeaderValue
+// Methods for converting between header::IntoHeaderValue<FilesetAutoBatch> and hyper::header::HeaderValue
#[cfg(any(feature = "client", feature = "server"))]
-impl std::convert::TryFrom<header::IntoHeaderValue<FilesetEntity>> for hyper::header::HeaderValue {
+impl std::convert::TryFrom<header::IntoHeaderValue<FilesetAutoBatch>>
+ for hyper::header::HeaderValue
+{
type Error = String;
fn try_from(
- hdr_value: header::IntoHeaderValue<FilesetEntity>,
+ hdr_value: header::IntoHeaderValue<FilesetAutoBatch>,
) -> std::result::Result<Self, Self::Error> {
let hdr_value = hdr_value.to_string();
match hyper::header::HeaderValue::from_str(&hdr_value) {
std::result::Result::Ok(value) => std::result::Result::Ok(value),
std::result::Result::Err(e) => std::result::Result::Err(format!(
- "Invalid header value for FilesetEntity - value: {} is invalid {}",
+ "Invalid header value for FilesetAutoBatch - value: {} is invalid {}",
hdr_value, e
)),
}
@@ -3884,18 +3905,20 @@ impl std::convert::TryFrom<header::IntoHeaderValue<FilesetEntity>> for hyper::he
}
#[cfg(any(feature = "client", feature = "server"))]
-impl std::convert::TryFrom<hyper::header::HeaderValue> for header::IntoHeaderValue<FilesetEntity> {
+impl std::convert::TryFrom<hyper::header::HeaderValue>
+ for header::IntoHeaderValue<FilesetAutoBatch>
+{
type Error = String;
fn try_from(hdr_value: hyper::header::HeaderValue) -> std::result::Result<Self, Self::Error> {
match hdr_value.to_str() {
std::result::Result::Ok(value) => {
- match <FilesetEntity as std::str::FromStr>::from_str(value) {
+ match <FilesetAutoBatch as std::str::FromStr>::from_str(value) {
std::result::Result::Ok(value) => {
std::result::Result::Ok(header::IntoHeaderValue(value))
}
std::result::Result::Err(err) => std::result::Result::Err(format!(
- "Unable to convert header value '{}' into FilesetEntity - {}",
+ "Unable to convert header value '{}' into FilesetAutoBatch - {}",
value, err
)),
}
@@ -4083,18 +4106,22 @@ impl std::str::FromStr for FilesetEntity {
if let Some(key) = key_result {
match key {
- "state" => intermediate_rep
- .state
- .push(String::from_str(val).map_err(|x| format!("{}", x))?),
- "ident" => intermediate_rep
- .ident
- .push(String::from_str(val).map_err(|x| format!("{}", x))?),
- "revision" => intermediate_rep
- .revision
- .push(String::from_str(val).map_err(|x| format!("{}", x))?),
- "redirect" => intermediate_rep
- .redirect
- .push(String::from_str(val).map_err(|x| format!("{}", x))?),
+ "state" => intermediate_rep.state.push(
+ <String as std::str::FromStr>::from_str(val)
+ .map_err(|x| format!("{}", x))?,
+ ),
+ "ident" => intermediate_rep.ident.push(
+ <String as std::str::FromStr>::from_str(val)
+ .map_err(|x| format!("{}", x))?,
+ ),
+ "revision" => intermediate_rep.revision.push(
+ <String as std::str::FromStr>::from_str(val)
+ .map_err(|x| format!("{}", x))?,
+ ),
+ "redirect" => intermediate_rep.redirect.push(
+ <String as std::str::FromStr>::from_str(val)
+ .map_err(|x| format!("{}", x))?,
+ ),
"extra" => {
return std::result::Result::Err(
"Parsing a container in this style is not supported in FilesetEntity"
@@ -4107,9 +4134,10 @@ impl std::str::FromStr for FilesetEntity {
.to_string(),
)
}
- "content_scope" => intermediate_rep
- .content_scope
- .push(String::from_str(val).map_err(|x| format!("{}", x))?),
+ "content_scope" => intermediate_rep.content_scope.push(
+ <String as std::str::FromStr>::from_str(val)
+ .map_err(|x| format!("{}", x))?,
+ ),
"manifest" => {
return std::result::Result::Err(
"Parsing a container in this style is not supported in FilesetEntity"
@@ -4163,20 +4191,20 @@ impl std::str::FromStr for FilesetEntity {
}
}
-// Methods for converting between header::IntoHeaderValue<FilesetFile> and hyper::header::HeaderValue
+// Methods for converting between header::IntoHeaderValue<FilesetEntity> and hyper::header::HeaderValue
#[cfg(any(feature = "client", feature = "server"))]
-impl std::convert::TryFrom<header::IntoHeaderValue<FilesetFile>> for hyper::header::HeaderValue {
+impl std::convert::TryFrom<header::IntoHeaderValue<FilesetEntity>> for hyper::header::HeaderValue {
type Error = String;
fn try_from(
- hdr_value: header::IntoHeaderValue<FilesetFile>,
+ hdr_value: header::IntoHeaderValue<FilesetEntity>,
) -> std::result::Result<Self, Self::Error> {
let hdr_value = hdr_value.to_string();
match hyper::header::HeaderValue::from_str(&hdr_value) {
std::result::Result::Ok(value) => std::result::Result::Ok(value),
std::result::Result::Err(e) => std::result::Result::Err(format!(
- "Invalid header value for FilesetFile - value: {} is invalid {}",
+ "Invalid header value for FilesetEntity - value: {} is invalid {}",
hdr_value, e
)),
}
@@ -4184,18 +4212,18 @@ impl std::convert::TryFrom<header::IntoHeaderValue<FilesetFile>> for hyper::head
}
#[cfg(any(feature = "client", feature = "server"))]
-impl std::convert::TryFrom<hyper::header::HeaderValue> for header::IntoHeaderValue<FilesetFile> {
+impl std::convert::TryFrom<hyper::header::HeaderValue> for header::IntoHeaderValue<FilesetEntity> {
type Error = String;
fn try_from(hdr_value: hyper::header::HeaderValue) -> std::result::Result<Self, Self::Error> {
match hdr_value.to_str() {
std::result::Result::Ok(value) => {
- match <FilesetFile as std::str::FromStr>::from_str(value) {
+ match <FilesetEntity as std::str::FromStr>::from_str(value) {
std::result::Result::Ok(value) => {
std::result::Result::Ok(header::IntoHeaderValue(value))
}
std::result::Result::Err(err) => std::result::Result::Err(format!(
- "Unable to convert header value '{}' into FilesetFile - {}",
+ "Unable to convert header value '{}' into FilesetEntity - {}",
value, err
)),
}
@@ -4335,24 +4363,29 @@ impl std::str::FromStr for FilesetFile {
if let Some(key) = key_result {
match key {
- "path" => intermediate_rep
- .path
- .push(String::from_str(val).map_err(|x| format!("{}", x))?),
- "size" => intermediate_rep
- .size
- .push(i64::from_str(val).map_err(|x| format!("{}", x))?),
- "md5" => intermediate_rep
- .md5
- .push(String::from_str(val).map_err(|x| format!("{}", x))?),
- "sha1" => intermediate_rep
- .sha1
- .push(String::from_str(val).map_err(|x| format!("{}", x))?),
- "sha256" => intermediate_rep
- .sha256
- .push(String::from_str(val).map_err(|x| format!("{}", x))?),
- "mimetype" => intermediate_rep
- .mimetype
- .push(String::from_str(val).map_err(|x| format!("{}", x))?),
+ "path" => intermediate_rep.path.push(
+ <String as std::str::FromStr>::from_str(val)
+ .map_err(|x| format!("{}", x))?,
+ ),
+ "size" => intermediate_rep.size.push(
+ <i64 as std::str::FromStr>::from_str(val).map_err(|x| format!("{}", x))?,
+ ),
+ "md5" => intermediate_rep.md5.push(
+ <String as std::str::FromStr>::from_str(val)
+ .map_err(|x| format!("{}", x))?,
+ ),
+ "sha1" => intermediate_rep.sha1.push(
+ <String as std::str::FromStr>::from_str(val)
+ .map_err(|x| format!("{}", x))?,
+ ),
+ "sha256" => intermediate_rep.sha256.push(
+ <String as std::str::FromStr>::from_str(val)
+ .map_err(|x| format!("{}", x))?,
+ ),
+ "mimetype" => intermediate_rep.mimetype.push(
+ <String as std::str::FromStr>::from_str(val)
+ .map_err(|x| format!("{}", x))?,
+ ),
"extra" => {
return std::result::Result::Err(
"Parsing a container in this style is not supported in FilesetFile"
@@ -4392,20 +4425,20 @@ impl std::str::FromStr for FilesetFile {
}
}
-// Methods for converting between header::IntoHeaderValue<FilesetUrl> and hyper::header::HeaderValue
+// Methods for converting between header::IntoHeaderValue<FilesetFile> and hyper::header::HeaderValue
#[cfg(any(feature = "client", feature = "server"))]
-impl std::convert::TryFrom<header::IntoHeaderValue<FilesetUrl>> for hyper::header::HeaderValue {
+impl std::convert::TryFrom<header::IntoHeaderValue<FilesetFile>> for hyper::header::HeaderValue {
type Error = String;
fn try_from(
- hdr_value: header::IntoHeaderValue<FilesetUrl>,
+ hdr_value: header::IntoHeaderValue<FilesetFile>,
) -> std::result::Result<Self, Self::Error> {
let hdr_value = hdr_value.to_string();
match hyper::header::HeaderValue::from_str(&hdr_value) {
std::result::Result::Ok(value) => std::result::Result::Ok(value),
std::result::Result::Err(e) => std::result::Result::Err(format!(
- "Invalid header value for FilesetUrl - value: {} is invalid {}",
+ "Invalid header value for FilesetFile - value: {} is invalid {}",
hdr_value, e
)),
}
@@ -4413,18 +4446,18 @@ impl std::convert::TryFrom<header::IntoHeaderValue<FilesetUrl>> for hyper::heade
}
#[cfg(any(feature = "client", feature = "server"))]
-impl std::convert::TryFrom<hyper::header::HeaderValue> for header::IntoHeaderValue<FilesetUrl> {
+impl std::convert::TryFrom<hyper::header::HeaderValue> for header::IntoHeaderValue<FilesetFile> {
type Error = String;
fn try_from(hdr_value: hyper::header::HeaderValue) -> std::result::Result<Self, Self::Error> {
match hdr_value.to_str() {
std::result::Result::Ok(value) => {
- match <FilesetUrl as std::str::FromStr>::from_str(value) {
+ match <FilesetFile as std::str::FromStr>::from_str(value) {
std::result::Result::Ok(value) => {
std::result::Result::Ok(header::IntoHeaderValue(value))
}
std::result::Result::Err(err) => std::result::Result::Err(format!(
- "Unable to convert header value '{}' into FilesetUrl - {}",
+ "Unable to convert header value '{}' into FilesetFile - {}",
value, err
)),
}
@@ -4503,12 +4536,14 @@ impl std::str::FromStr for FilesetUrl {
if let Some(key) = key_result {
match key {
- "url" => intermediate_rep
- .url
- .push(String::from_str(val).map_err(|x| format!("{}", x))?),
- "rel" => intermediate_rep
- .rel
- .push(String::from_str(val).map_err(|x| format!("{}", x))?),
+ "url" => intermediate_rep.url.push(
+ <String as std::str::FromStr>::from_str(val)
+ .map_err(|x| format!("{}", x))?,
+ ),
+ "rel" => intermediate_rep.rel.push(
+ <String as std::str::FromStr>::from_str(val)
+ .map_err(|x| format!("{}", x))?,
+ ),
_ => {
return std::result::Result::Err(
"Unexpected key while parsing FilesetUrl".to_string(),
@@ -4537,22 +4572,20 @@ impl std::str::FromStr for FilesetUrl {
}
}
-// Methods for converting between header::IntoHeaderValue<ReleaseAbstract> and hyper::header::HeaderValue
+// Methods for converting between header::IntoHeaderValue<FilesetUrl> and hyper::header::HeaderValue
#[cfg(any(feature = "client", feature = "server"))]
-impl std::convert::TryFrom<header::IntoHeaderValue<ReleaseAbstract>>
- for hyper::header::HeaderValue
-{
+impl std::convert::TryFrom<header::IntoHeaderValue<FilesetUrl>> for hyper::header::HeaderValue {
type Error = String;
fn try_from(
- hdr_value: header::IntoHeaderValue<ReleaseAbstract>,
+ hdr_value: header::IntoHeaderValue<FilesetUrl>,
) -> std::result::Result<Self, Self::Error> {
let hdr_value = hdr_value.to_string();
match hyper::header::HeaderValue::from_str(&hdr_value) {
std::result::Result::Ok(value) => std::result::Result::Ok(value),
std::result::Result::Err(e) => std::result::Result::Err(format!(
- "Invalid header value for ReleaseAbstract - value: {} is invalid {}",
+ "Invalid header value for FilesetUrl - value: {} is invalid {}",
hdr_value, e
)),
}
@@ -4560,20 +4593,18 @@ impl std::convert::TryFrom<header::IntoHeaderValue<ReleaseAbstract>>
}
#[cfg(any(feature = "client", feature = "server"))]
-impl std::convert::TryFrom<hyper::header::HeaderValue>
- for header::IntoHeaderValue<ReleaseAbstract>
-{
+impl std::convert::TryFrom<hyper::header::HeaderValue> for header::IntoHeaderValue<FilesetUrl> {
type Error = String;
fn try_from(hdr_value: hyper::header::HeaderValue) -> std::result::Result<Self, Self::Error> {
match hdr_value.to_str() {
std::result::Result::Ok(value) => {
- match <ReleaseAbstract as std::str::FromStr>::from_str(value) {
+ match <FilesetUrl as std::str::FromStr>::from_str(value) {
std::result::Result::Ok(value) => {
std::result::Result::Ok(header::IntoHeaderValue(value))
}
std::result::Result::Err(err) => std::result::Result::Err(format!(
- "Unable to convert header value '{}' into ReleaseAbstract - {}",
+ "Unable to convert header value '{}' into FilesetUrl - {}",
value, err
)),
}
@@ -4686,18 +4717,22 @@ impl std::str::FromStr for ReleaseAbstract {
if let Some(key) = key_result {
match key {
- "sha1" => intermediate_rep
- .sha1
- .push(String::from_str(val).map_err(|x| format!("{}", x))?),
- "content" => intermediate_rep
- .content
- .push(String::from_str(val).map_err(|x| format!("{}", x))?),
- "mimetype" => intermediate_rep
- .mimetype
- .push(String::from_str(val).map_err(|x| format!("{}", x))?),
- "lang" => intermediate_rep
- .lang
- .push(String::from_str(val).map_err(|x| format!("{}", x))?),
+ "sha1" => intermediate_rep.sha1.push(
+ <String as std::str::FromStr>::from_str(val)
+ .map_err(|x| format!("{}", x))?,
+ ),
+ "content" => intermediate_rep.content.push(
+ <String as std::str::FromStr>::from_str(val)
+ .map_err(|x| format!("{}", x))?,
+ ),
+ "mimetype" => intermediate_rep.mimetype.push(
+ <String as std::str::FromStr>::from_str(val)
+ .map_err(|x| format!("{}", x))?,
+ ),
+ "lang" => intermediate_rep.lang.push(
+ <String as std::str::FromStr>::from_str(val)
+ .map_err(|x| format!("{}", x))?,
+ ),
_ => {
return std::result::Result::Err(
"Unexpected key while parsing ReleaseAbstract".to_string(),
@@ -4720,22 +4755,22 @@ impl std::str::FromStr for ReleaseAbstract {
}
}
-// Methods for converting between header::IntoHeaderValue<ReleaseAutoBatch> and hyper::header::HeaderValue
+// Methods for converting between header::IntoHeaderValue<ReleaseAbstract> and hyper::header::HeaderValue
#[cfg(any(feature = "client", feature = "server"))]
-impl std::convert::TryFrom<header::IntoHeaderValue<ReleaseAutoBatch>>
+impl std::convert::TryFrom<header::IntoHeaderValue<ReleaseAbstract>>
for hyper::header::HeaderValue
{
type Error = String;
fn try_from(
- hdr_value: header::IntoHeaderValue<ReleaseAutoBatch>,
+ hdr_value: header::IntoHeaderValue<ReleaseAbstract>,
) -> std::result::Result<Self, Self::Error> {
let hdr_value = hdr_value.to_string();
match hyper::header::HeaderValue::from_str(&hdr_value) {
std::result::Result::Ok(value) => std::result::Result::Ok(value),
std::result::Result::Err(e) => std::result::Result::Err(format!(
- "Invalid header value for ReleaseAutoBatch - value: {} is invalid {}",
+ "Invalid header value for ReleaseAbstract - value: {} is invalid {}",
hdr_value, e
)),
}
@@ -4744,19 +4779,19 @@ impl std::convert::TryFrom<header::IntoHeaderValue<ReleaseAutoBatch>>
#[cfg(any(feature = "client", feature = "server"))]
impl std::convert::TryFrom<hyper::header::HeaderValue>
- for header::IntoHeaderValue<ReleaseAutoBatch>
+ for header::IntoHeaderValue<ReleaseAbstract>
{
type Error = String;
fn try_from(hdr_value: hyper::header::HeaderValue) -> std::result::Result<Self, Self::Error> {
match hdr_value.to_str() {
std::result::Result::Ok(value) => {
- match <ReleaseAutoBatch as std::str::FromStr>::from_str(value) {
+ match <ReleaseAbstract as std::str::FromStr>::from_str(value) {
std::result::Result::Ok(value) => {
std::result::Result::Ok(header::IntoHeaderValue(value))
}
std::result::Result::Err(err) => std::result::Result::Err(format!(
- "Unable to convert header value '{}' into ReleaseAutoBatch - {}",
+ "Unable to convert header value '{}' into ReleaseAbstract - {}",
value, err
)),
}
@@ -4837,9 +4872,10 @@ impl std::str::FromStr for ReleaseAutoBatch {
if let Some(key) = key_result {
match key {
- "editgroup" => intermediate_rep
- .editgroup
- .push(models::Editgroup::from_str(val).map_err(|x| format!("{}", x))?),
+ "editgroup" => intermediate_rep.editgroup.push(
+ <models::Editgroup as std::str::FromStr>::from_str(val)
+ .map_err(|x| format!("{}", x))?,
+ ),
"entity_list" => return std::result::Result::Err(
"Parsing a container in this style is not supported in ReleaseAutoBatch"
.to_string(),
@@ -4872,20 +4908,22 @@ impl std::str::FromStr for ReleaseAutoBatch {
}
}
-// Methods for converting between header::IntoHeaderValue<ReleaseContrib> and hyper::header::HeaderValue
+// Methods for converting between header::IntoHeaderValue<ReleaseAutoBatch> and hyper::header::HeaderValue
#[cfg(any(feature = "client", feature = "server"))]
-impl std::convert::TryFrom<header::IntoHeaderValue<ReleaseContrib>> for hyper::header::HeaderValue {
+impl std::convert::TryFrom<header::IntoHeaderValue<ReleaseAutoBatch>>
+ for hyper::header::HeaderValue
+{
type Error = String;
fn try_from(
- hdr_value: header::IntoHeaderValue<ReleaseContrib>,
+ hdr_value: header::IntoHeaderValue<ReleaseAutoBatch>,
) -> std::result::Result<Self, Self::Error> {
let hdr_value = hdr_value.to_string();
match hyper::header::HeaderValue::from_str(&hdr_value) {
std::result::Result::Ok(value) => std::result::Result::Ok(value),
std::result::Result::Err(e) => std::result::Result::Err(format!(
- "Invalid header value for ReleaseContrib - value: {} is invalid {}",
+ "Invalid header value for ReleaseAutoBatch - value: {} is invalid {}",
hdr_value, e
)),
}
@@ -4893,18 +4931,20 @@ impl std::convert::TryFrom<header::IntoHeaderValue<ReleaseContrib>> for hyper::h
}
#[cfg(any(feature = "client", feature = "server"))]
-impl std::convert::TryFrom<hyper::header::HeaderValue> for header::IntoHeaderValue<ReleaseContrib> {
+impl std::convert::TryFrom<hyper::header::HeaderValue>
+ for header::IntoHeaderValue<ReleaseAutoBatch>
+{
type Error = String;
fn try_from(hdr_value: hyper::header::HeaderValue) -> std::result::Result<Self, Self::Error> {
match hdr_value.to_str() {
std::result::Result::Ok(value) => {
- match <ReleaseContrib as std::str::FromStr>::from_str(value) {
+ match <ReleaseAutoBatch as std::str::FromStr>::from_str(value) {
std::result::Result::Ok(value) => {
std::result::Result::Ok(header::IntoHeaderValue(value))
}
std::result::Result::Err(err) => std::result::Result::Err(format!(
- "Unable to convert header value '{}' into ReleaseContrib - {}",
+ "Unable to convert header value '{}' into ReleaseAutoBatch - {}",
value, err
)),
}
@@ -5071,30 +5111,37 @@ impl std::str::FromStr for ReleaseContrib {
if let Some(key) = key_result {
match key {
- "index" => intermediate_rep
- .index
- .push(i64::from_str(val).map_err(|x| format!("{}", x))?),
- "creator_id" => intermediate_rep
- .creator_id
- .push(String::from_str(val).map_err(|x| format!("{}", x))?),
- "creator" => intermediate_rep
- .creator
- .push(models::CreatorEntity::from_str(val).map_err(|x| format!("{}", x))?),
- "raw_name" => intermediate_rep
- .raw_name
- .push(String::from_str(val).map_err(|x| format!("{}", x))?),
- "given_name" => intermediate_rep
- .given_name
- .push(String::from_str(val).map_err(|x| format!("{}", x))?),
- "surname" => intermediate_rep
- .surname
- .push(String::from_str(val).map_err(|x| format!("{}", x))?),
- "role" => intermediate_rep
- .role
- .push(String::from_str(val).map_err(|x| format!("{}", x))?),
- "raw_affiliation" => intermediate_rep
- .raw_affiliation
- .push(String::from_str(val).map_err(|x| format!("{}", x))?),
+ "index" => intermediate_rep.index.push(
+ <i64 as std::str::FromStr>::from_str(val).map_err(|x| format!("{}", x))?,
+ ),
+ "creator_id" => intermediate_rep.creator_id.push(
+ <String as std::str::FromStr>::from_str(val)
+ .map_err(|x| format!("{}", x))?,
+ ),
+ "creator" => intermediate_rep.creator.push(
+ <models::CreatorEntity as std::str::FromStr>::from_str(val)
+ .map_err(|x| format!("{}", x))?,
+ ),
+ "raw_name" => intermediate_rep.raw_name.push(
+ <String as std::str::FromStr>::from_str(val)
+ .map_err(|x| format!("{}", x))?,
+ ),
+ "given_name" => intermediate_rep.given_name.push(
+ <String as std::str::FromStr>::from_str(val)
+ .map_err(|x| format!("{}", x))?,
+ ),
+ "surname" => intermediate_rep.surname.push(
+ <String as std::str::FromStr>::from_str(val)
+ .map_err(|x| format!("{}", x))?,
+ ),
+ "role" => intermediate_rep.role.push(
+ <String as std::str::FromStr>::from_str(val)
+ .map_err(|x| format!("{}", x))?,
+ ),
+ "raw_affiliation" => intermediate_rep.raw_affiliation.push(
+ <String as std::str::FromStr>::from_str(val)
+ .map_err(|x| format!("{}", x))?,
+ ),
"extra" => {
return std::result::Result::Err(
"Parsing a container in this style is not supported in ReleaseContrib"
@@ -5128,20 +5175,20 @@ impl std::str::FromStr for ReleaseContrib {
}
}
-// Methods for converting between header::IntoHeaderValue<ReleaseEntity> and hyper::header::HeaderValue
+// Methods for converting between header::IntoHeaderValue<ReleaseContrib> and hyper::header::HeaderValue
#[cfg(any(feature = "client", feature = "server"))]
-impl std::convert::TryFrom<header::IntoHeaderValue<ReleaseEntity>> for hyper::header::HeaderValue {
+impl std::convert::TryFrom<header::IntoHeaderValue<ReleaseContrib>> for hyper::header::HeaderValue {
type Error = String;
fn try_from(
- hdr_value: header::IntoHeaderValue<ReleaseEntity>,
+ hdr_value: header::IntoHeaderValue<ReleaseContrib>,
) -> std::result::Result<Self, Self::Error> {
let hdr_value = hdr_value.to_string();
match hyper::header::HeaderValue::from_str(&hdr_value) {
std::result::Result::Ok(value) => std::result::Result::Ok(value),
std::result::Result::Err(e) => std::result::Result::Err(format!(
- "Invalid header value for ReleaseEntity - value: {} is invalid {}",
+ "Invalid header value for ReleaseContrib - value: {} is invalid {}",
hdr_value, e
)),
}
@@ -5149,18 +5196,18 @@ impl std::convert::TryFrom<header::IntoHeaderValue<ReleaseEntity>> for hyper::he
}
#[cfg(any(feature = "client", feature = "server"))]
-impl std::convert::TryFrom<hyper::header::HeaderValue> for header::IntoHeaderValue<ReleaseEntity> {
+impl std::convert::TryFrom<hyper::header::HeaderValue> for header::IntoHeaderValue<ReleaseContrib> {
type Error = String;
fn try_from(hdr_value: hyper::header::HeaderValue) -> std::result::Result<Self, Self::Error> {
match hdr_value.to_str() {
std::result::Result::Ok(value) => {
- match <ReleaseEntity as std::str::FromStr>::from_str(value) {
+ match <ReleaseContrib as std::str::FromStr>::from_str(value) {
std::result::Result::Ok(value) => {
std::result::Result::Ok(header::IntoHeaderValue(value))
}
std::result::Result::Err(err) => std::result::Result::Err(format!(
- "Unable to convert header value '{}' into ReleaseEntity - {}",
+ "Unable to convert header value '{}' into ReleaseContrib - {}",
value, err
)),
}
@@ -5593,18 +5640,22 @@ impl std::str::FromStr for ReleaseEntity {
if let Some(key) = key_result {
match key {
- "state" => intermediate_rep
- .state
- .push(String::from_str(val).map_err(|x| format!("{}", x))?),
- "ident" => intermediate_rep
- .ident
- .push(String::from_str(val).map_err(|x| format!("{}", x))?),
- "revision" => intermediate_rep
- .revision
- .push(String::from_str(val).map_err(|x| format!("{}", x))?),
- "redirect" => intermediate_rep
- .redirect
- .push(String::from_str(val).map_err(|x| format!("{}", x))?),
+ "state" => intermediate_rep.state.push(
+ <String as std::str::FromStr>::from_str(val)
+ .map_err(|x| format!("{}", x))?,
+ ),
+ "ident" => intermediate_rep.ident.push(
+ <String as std::str::FromStr>::from_str(val)
+ .map_err(|x| format!("{}", x))?,
+ ),
+ "revision" => intermediate_rep.revision.push(
+ <String as std::str::FromStr>::from_str(val)
+ .map_err(|x| format!("{}", x))?,
+ ),
+ "redirect" => intermediate_rep.redirect.push(
+ <String as std::str::FromStr>::from_str(val)
+ .map_err(|x| format!("{}", x))?,
+ ),
"extra" => {
return std::result::Result::Err(
"Parsing a container in this style is not supported in ReleaseEntity"
@@ -5617,20 +5668,25 @@ impl std::str::FromStr for ReleaseEntity {
.to_string(),
)
}
- "title" => intermediate_rep
- .title
- .push(String::from_str(val).map_err(|x| format!("{}", x))?),
- "subtitle" => intermediate_rep
- .subtitle
- .push(String::from_str(val).map_err(|x| format!("{}", x))?),
- "original_title" => intermediate_rep
- .original_title
- .push(String::from_str(val).map_err(|x| format!("{}", x))?),
- "work_id" => intermediate_rep
- .work_id
- .push(String::from_str(val).map_err(|x| format!("{}", x))?),
+ "title" => intermediate_rep.title.push(
+ <String as std::str::FromStr>::from_str(val)
+ .map_err(|x| format!("{}", x))?,
+ ),
+ "subtitle" => intermediate_rep.subtitle.push(
+ <String as std::str::FromStr>::from_str(val)
+ .map_err(|x| format!("{}", x))?,
+ ),
+ "original_title" => intermediate_rep.original_title.push(
+ <String as std::str::FromStr>::from_str(val)
+ .map_err(|x| format!("{}", x))?,
+ ),
+ "work_id" => intermediate_rep.work_id.push(
+ <String as std::str::FromStr>::from_str(val)
+ .map_err(|x| format!("{}", x))?,
+ ),
"container" => intermediate_rep.container.push(
- models::ContainerEntity::from_str(val).map_err(|x| format!("{}", x))?,
+ <models::ContainerEntity as std::str::FromStr>::from_str(val)
+ .map_err(|x| format!("{}", x))?,
),
"files" => {
return std::result::Result::Err(
@@ -5650,57 +5706,72 @@ impl std::str::FromStr for ReleaseEntity {
.to_string(),
)
}
- "container_id" => intermediate_rep
- .container_id
- .push(String::from_str(val).map_err(|x| format!("{}", x))?),
- "release_type" => intermediate_rep
- .release_type
- .push(String::from_str(val).map_err(|x| format!("{}", x))?),
- "release_stage" => intermediate_rep
- .release_stage
- .push(String::from_str(val).map_err(|x| format!("{}", x))?),
- "release_date" => intermediate_rep
- .release_date
- .push(chrono::NaiveDate::from_str(val).map_err(|x| format!("{}", x))?),
- "release_year" => intermediate_rep
- .release_year
- .push(i64::from_str(val).map_err(|x| format!("{}", x))?),
- "withdrawn_status" => intermediate_rep
- .withdrawn_status
- .push(String::from_str(val).map_err(|x| format!("{}", x))?),
- "withdrawn_date" => intermediate_rep
- .withdrawn_date
- .push(chrono::NaiveDate::from_str(val).map_err(|x| format!("{}", x))?),
- "withdrawn_year" => intermediate_rep
- .withdrawn_year
- .push(i64::from_str(val).map_err(|x| format!("{}", x))?),
- "ext_ids" => intermediate_rep
- .ext_ids
- .push(models::ReleaseExtIds::from_str(val).map_err(|x| format!("{}", x))?),
- "volume" => intermediate_rep
- .volume
- .push(String::from_str(val).map_err(|x| format!("{}", x))?),
- "issue" => intermediate_rep
- .issue
- .push(String::from_str(val).map_err(|x| format!("{}", x))?),
- "pages" => intermediate_rep
- .pages
- .push(String::from_str(val).map_err(|x| format!("{}", x))?),
- "number" => intermediate_rep
- .number
- .push(String::from_str(val).map_err(|x| format!("{}", x))?),
- "version" => intermediate_rep
- .version
- .push(String::from_str(val).map_err(|x| format!("{}", x))?),
- "publisher" => intermediate_rep
- .publisher
- .push(String::from_str(val).map_err(|x| format!("{}", x))?),
- "language" => intermediate_rep
- .language
- .push(String::from_str(val).map_err(|x| format!("{}", x))?),
- "license_slug" => intermediate_rep
- .license_slug
- .push(String::from_str(val).map_err(|x| format!("{}", x))?),
+ "container_id" => intermediate_rep.container_id.push(
+ <String as std::str::FromStr>::from_str(val)
+ .map_err(|x| format!("{}", x))?,
+ ),
+ "release_type" => intermediate_rep.release_type.push(
+ <String as std::str::FromStr>::from_str(val)
+ .map_err(|x| format!("{}", x))?,
+ ),
+ "release_stage" => intermediate_rep.release_stage.push(
+ <String as std::str::FromStr>::from_str(val)
+ .map_err(|x| format!("{}", x))?,
+ ),
+ "release_date" => intermediate_rep.release_date.push(
+ <chrono::NaiveDate as std::str::FromStr>::from_str(val)
+ .map_err(|x| format!("{}", x))?,
+ ),
+ "release_year" => intermediate_rep.release_year.push(
+ <i64 as std::str::FromStr>::from_str(val).map_err(|x| format!("{}", x))?,
+ ),
+ "withdrawn_status" => intermediate_rep.withdrawn_status.push(
+ <String as std::str::FromStr>::from_str(val)
+ .map_err(|x| format!("{}", x))?,
+ ),
+ "withdrawn_date" => intermediate_rep.withdrawn_date.push(
+ <chrono::NaiveDate as std::str::FromStr>::from_str(val)
+ .map_err(|x| format!("{}", x))?,
+ ),
+ "withdrawn_year" => intermediate_rep.withdrawn_year.push(
+ <i64 as std::str::FromStr>::from_str(val).map_err(|x| format!("{}", x))?,
+ ),
+ "ext_ids" => intermediate_rep.ext_ids.push(
+ <models::ReleaseExtIds as std::str::FromStr>::from_str(val)
+ .map_err(|x| format!("{}", x))?,
+ ),
+ "volume" => intermediate_rep.volume.push(
+ <String as std::str::FromStr>::from_str(val)
+ .map_err(|x| format!("{}", x))?,
+ ),
+ "issue" => intermediate_rep.issue.push(
+ <String as std::str::FromStr>::from_str(val)
+ .map_err(|x| format!("{}", x))?,
+ ),
+ "pages" => intermediate_rep.pages.push(
+ <String as std::str::FromStr>::from_str(val)
+ .map_err(|x| format!("{}", x))?,
+ ),
+ "number" => intermediate_rep.number.push(
+ <String as std::str::FromStr>::from_str(val)
+ .map_err(|x| format!("{}", x))?,
+ ),
+ "version" => intermediate_rep.version.push(
+ <String as std::str::FromStr>::from_str(val)
+ .map_err(|x| format!("{}", x))?,
+ ),
+ "publisher" => intermediate_rep.publisher.push(
+ <String as std::str::FromStr>::from_str(val)
+ .map_err(|x| format!("{}", x))?,
+ ),
+ "language" => intermediate_rep.language.push(
+ <String as std::str::FromStr>::from_str(val)
+ .map_err(|x| format!("{}", x))?,
+ ),
+ "license_slug" => intermediate_rep.license_slug.push(
+ <String as std::str::FromStr>::from_str(val)
+ .map_err(|x| format!("{}", x))?,
+ ),
"contribs" => {
return std::result::Result::Err(
"Parsing a container in this style is not supported in ReleaseEntity"
@@ -5775,20 +5846,20 @@ impl std::str::FromStr for ReleaseEntity {
}
}
-// Methods for converting between header::IntoHeaderValue<ReleaseExtIds> and hyper::header::HeaderValue
+// Methods for converting between header::IntoHeaderValue<ReleaseEntity> and hyper::header::HeaderValue
#[cfg(any(feature = "client", feature = "server"))]
-impl std::convert::TryFrom<header::IntoHeaderValue<ReleaseExtIds>> for hyper::header::HeaderValue {
+impl std::convert::TryFrom<header::IntoHeaderValue<ReleaseEntity>> for hyper::header::HeaderValue {
type Error = String;
fn try_from(
- hdr_value: header::IntoHeaderValue<ReleaseExtIds>,
+ hdr_value: header::IntoHeaderValue<ReleaseEntity>,
) -> std::result::Result<Self, Self::Error> {
let hdr_value = hdr_value.to_string();
match hyper::header::HeaderValue::from_str(&hdr_value) {
std::result::Result::Ok(value) => std::result::Result::Ok(value),
std::result::Result::Err(e) => std::result::Result::Err(format!(
- "Invalid header value for ReleaseExtIds - value: {} is invalid {}",
+ "Invalid header value for ReleaseEntity - value: {} is invalid {}",
hdr_value, e
)),
}
@@ -5796,18 +5867,18 @@ impl std::convert::TryFrom<header::IntoHeaderValue<ReleaseExtIds>> for hyper::he
}
#[cfg(any(feature = "client", feature = "server"))]
-impl std::convert::TryFrom<hyper::header::HeaderValue> for header::IntoHeaderValue<ReleaseExtIds> {
+impl std::convert::TryFrom<hyper::header::HeaderValue> for header::IntoHeaderValue<ReleaseEntity> {
type Error = String;
fn try_from(hdr_value: hyper::header::HeaderValue) -> std::result::Result<Self, Self::Error> {
match hdr_value.to_str() {
std::result::Result::Ok(value) => {
- match <ReleaseExtIds as std::str::FromStr>::from_str(value) {
+ match <ReleaseEntity as std::str::FromStr>::from_str(value) {
std::result::Result::Ok(value) => {
std::result::Result::Ok(header::IntoHeaderValue(value))
}
std::result::Result::Err(err) => std::result::Result::Err(format!(
- "Unable to convert header value '{}' into ReleaseExtIds - {}",
+ "Unable to convert header value '{}' into ReleaseEntity - {}",
value, err
)),
}
@@ -6040,48 +6111,62 @@ impl std::str::FromStr for ReleaseExtIds {
if let Some(key) = key_result {
match key {
- "doi" => intermediate_rep
- .doi
- .push(String::from_str(val).map_err(|x| format!("{}", x))?),
- "wikidata_qid" => intermediate_rep
- .wikidata_qid
- .push(String::from_str(val).map_err(|x| format!("{}", x))?),
- "isbn13" => intermediate_rep
- .isbn13
- .push(String::from_str(val).map_err(|x| format!("{}", x))?),
- "pmid" => intermediate_rep
- .pmid
- .push(String::from_str(val).map_err(|x| format!("{}", x))?),
- "pmcid" => intermediate_rep
- .pmcid
- .push(String::from_str(val).map_err(|x| format!("{}", x))?),
- "core" => intermediate_rep
- .core
- .push(String::from_str(val).map_err(|x| format!("{}", x))?),
- "arxiv" => intermediate_rep
- .arxiv
- .push(String::from_str(val).map_err(|x| format!("{}", x))?),
- "jstor" => intermediate_rep
- .jstor
- .push(String::from_str(val).map_err(|x| format!("{}", x))?),
- "ark" => intermediate_rep
- .ark
- .push(String::from_str(val).map_err(|x| format!("{}", x))?),
- "mag" => intermediate_rep
- .mag
- .push(String::from_str(val).map_err(|x| format!("{}", x))?),
- "doaj" => intermediate_rep
- .doaj
- .push(String::from_str(val).map_err(|x| format!("{}", x))?),
- "dblp" => intermediate_rep
- .dblp
- .push(String::from_str(val).map_err(|x| format!("{}", x))?),
- "oai" => intermediate_rep
- .oai
- .push(String::from_str(val).map_err(|x| format!("{}", x))?),
- "hdl" => intermediate_rep
- .hdl
- .push(String::from_str(val).map_err(|x| format!("{}", x))?),
+ "doi" => intermediate_rep.doi.push(
+ <String as std::str::FromStr>::from_str(val)
+ .map_err(|x| format!("{}", x))?,
+ ),
+ "wikidata_qid" => intermediate_rep.wikidata_qid.push(
+ <String as std::str::FromStr>::from_str(val)
+ .map_err(|x| format!("{}", x))?,
+ ),
+ "isbn13" => intermediate_rep.isbn13.push(
+ <String as std::str::FromStr>::from_str(val)
+ .map_err(|x| format!("{}", x))?,
+ ),
+ "pmid" => intermediate_rep.pmid.push(
+ <String as std::str::FromStr>::from_str(val)
+ .map_err(|x| format!("{}", x))?,
+ ),
+ "pmcid" => intermediate_rep.pmcid.push(
+ <String as std::str::FromStr>::from_str(val)
+ .map_err(|x| format!("{}", x))?,
+ ),
+ "core" => intermediate_rep.core.push(
+ <String as std::str::FromStr>::from_str(val)
+ .map_err(|x| format!("{}", x))?,
+ ),
+ "arxiv" => intermediate_rep.arxiv.push(
+ <String as std::str::FromStr>::from_str(val)
+ .map_err(|x| format!("{}", x))?,
+ ),
+ "jstor" => intermediate_rep.jstor.push(
+ <String as std::str::FromStr>::from_str(val)
+ .map_err(|x| format!("{}", x))?,
+ ),
+ "ark" => intermediate_rep.ark.push(
+ <String as std::str::FromStr>::from_str(val)
+ .map_err(|x| format!("{}", x))?,
+ ),
+ "mag" => intermediate_rep.mag.push(
+ <String as std::str::FromStr>::from_str(val)
+ .map_err(|x| format!("{}", x))?,
+ ),
+ "doaj" => intermediate_rep.doaj.push(
+ <String as std::str::FromStr>::from_str(val)
+ .map_err(|x| format!("{}", x))?,
+ ),
+ "dblp" => intermediate_rep.dblp.push(
+ <String as std::str::FromStr>::from_str(val)
+ .map_err(|x| format!("{}", x))?,
+ ),
+ "oai" => intermediate_rep.oai.push(
+ <String as std::str::FromStr>::from_str(val)
+ .map_err(|x| format!("{}", x))?,
+ ),
+ "hdl" => intermediate_rep.hdl.push(
+ <String as std::str::FromStr>::from_str(val)
+ .map_err(|x| format!("{}", x))?,
+ ),
_ => {
return std::result::Result::Err(
"Unexpected key while parsing ReleaseExtIds".to_string(),
@@ -6114,20 +6199,20 @@ impl std::str::FromStr for ReleaseExtIds {
}
}
-// Methods for converting between header::IntoHeaderValue<ReleaseRef> and hyper::header::HeaderValue
+// Methods for converting between header::IntoHeaderValue<ReleaseExtIds> and hyper::header::HeaderValue
#[cfg(any(feature = "client", feature = "server"))]
-impl std::convert::TryFrom<header::IntoHeaderValue<ReleaseRef>> for hyper::header::HeaderValue {
+impl std::convert::TryFrom<header::IntoHeaderValue<ReleaseExtIds>> for hyper::header::HeaderValue {
type Error = String;
fn try_from(
- hdr_value: header::IntoHeaderValue<ReleaseRef>,
+ hdr_value: header::IntoHeaderValue<ReleaseExtIds>,
) -> std::result::Result<Self, Self::Error> {
let hdr_value = hdr_value.to_string();
match hyper::header::HeaderValue::from_str(&hdr_value) {
std::result::Result::Ok(value) => std::result::Result::Ok(value),
std::result::Result::Err(e) => std::result::Result::Err(format!(
- "Invalid header value for ReleaseRef - value: {} is invalid {}",
+ "Invalid header value for ReleaseExtIds - value: {} is invalid {}",
hdr_value, e
)),
}
@@ -6135,18 +6220,18 @@ impl std::convert::TryFrom<header::IntoHeaderValue<ReleaseRef>> for hyper::heade
}
#[cfg(any(feature = "client", feature = "server"))]
-impl std::convert::TryFrom<hyper::header::HeaderValue> for header::IntoHeaderValue<ReleaseRef> {
+impl std::convert::TryFrom<hyper::header::HeaderValue> for header::IntoHeaderValue<ReleaseExtIds> {
type Error = String;
fn try_from(hdr_value: hyper::header::HeaderValue) -> std::result::Result<Self, Self::Error> {
match hdr_value.to_str() {
std::result::Result::Ok(value) => {
- match <ReleaseRef as std::str::FromStr>::from_str(value) {
+ match <ReleaseExtIds as std::str::FromStr>::from_str(value) {
std::result::Result::Ok(value) => {
std::result::Result::Ok(header::IntoHeaderValue(value))
}
std::result::Result::Err(err) => std::result::Result::Err(format!(
- "Unable to convert header value '{}' into ReleaseRef - {}",
+ "Unable to convert header value '{}' into ReleaseExtIds - {}",
value, err
)),
}
@@ -6305,33 +6390,38 @@ impl std::str::FromStr for ReleaseRef {
if let Some(key) = key_result {
match key {
- "index" => intermediate_rep
- .index
- .push(i64::from_str(val).map_err(|x| format!("{}", x))?),
- "target_release_id" => intermediate_rep
- .target_release_id
- .push(String::from_str(val).map_err(|x| format!("{}", x))?),
+ "index" => intermediate_rep.index.push(
+ <i64 as std::str::FromStr>::from_str(val).map_err(|x| format!("{}", x))?,
+ ),
+ "target_release_id" => intermediate_rep.target_release_id.push(
+ <String as std::str::FromStr>::from_str(val)
+ .map_err(|x| format!("{}", x))?,
+ ),
"extra" => {
return std::result::Result::Err(
"Parsing a container in this style is not supported in ReleaseRef"
.to_string(),
)
}
- "key" => intermediate_rep
- .key
- .push(String::from_str(val).map_err(|x| format!("{}", x))?),
- "year" => intermediate_rep
- .year
- .push(i64::from_str(val).map_err(|x| format!("{}", x))?),
- "container_name" => intermediate_rep
- .container_name
- .push(String::from_str(val).map_err(|x| format!("{}", x))?),
- "title" => intermediate_rep
- .title
- .push(String::from_str(val).map_err(|x| format!("{}", x))?),
- "locator" => intermediate_rep
- .locator
- .push(String::from_str(val).map_err(|x| format!("{}", x))?),
+ "key" => intermediate_rep.key.push(
+ <String as std::str::FromStr>::from_str(val)
+ .map_err(|x| format!("{}", x))?,
+ ),
+ "year" => intermediate_rep.year.push(
+ <i64 as std::str::FromStr>::from_str(val).map_err(|x| format!("{}", x))?,
+ ),
+ "container_name" => intermediate_rep.container_name.push(
+ <String as std::str::FromStr>::from_str(val)
+ .map_err(|x| format!("{}", x))?,
+ ),
+ "title" => intermediate_rep.title.push(
+ <String as std::str::FromStr>::from_str(val)
+ .map_err(|x| format!("{}", x))?,
+ ),
+ "locator" => intermediate_rep.locator.push(
+ <String as std::str::FromStr>::from_str(val)
+ .map_err(|x| format!("{}", x))?,
+ ),
_ => {
return std::result::Result::Err(
"Unexpected key while parsing ReleaseRef".to_string(),
@@ -6358,20 +6448,20 @@ impl std::str::FromStr for ReleaseRef {
}
}
-// Methods for converting between header::IntoHeaderValue<Success> and hyper::header::HeaderValue
+// Methods for converting between header::IntoHeaderValue<ReleaseRef> and hyper::header::HeaderValue
#[cfg(any(feature = "client", feature = "server"))]
-impl std::convert::TryFrom<header::IntoHeaderValue<Success>> for hyper::header::HeaderValue {
+impl std::convert::TryFrom<header::IntoHeaderValue<ReleaseRef>> for hyper::header::HeaderValue {
type Error = String;
fn try_from(
- hdr_value: header::IntoHeaderValue<Success>,
+ hdr_value: header::IntoHeaderValue<ReleaseRef>,
) -> std::result::Result<Self, Self::Error> {
let hdr_value = hdr_value.to_string();
match hyper::header::HeaderValue::from_str(&hdr_value) {
std::result::Result::Ok(value) => std::result::Result::Ok(value),
std::result::Result::Err(e) => std::result::Result::Err(format!(
- "Invalid header value for Success - value: {} is invalid {}",
+ "Invalid header value for ReleaseRef - value: {} is invalid {}",
hdr_value, e
)),
}
@@ -6379,18 +6469,18 @@ impl std::convert::TryFrom<header::IntoHeaderValue<Success>> for hyper::header::
}
#[cfg(any(feature = "client", feature = "server"))]
-impl std::convert::TryFrom<hyper::header::HeaderValue> for header::IntoHeaderValue<Success> {
+impl std::convert::TryFrom<hyper::header::HeaderValue> for header::IntoHeaderValue<ReleaseRef> {
type Error = String;
fn try_from(hdr_value: hyper::header::HeaderValue) -> std::result::Result<Self, Self::Error> {
match hdr_value.to_str() {
std::result::Result::Ok(value) => {
- match <Success as std::str::FromStr>::from_str(value) {
+ match <ReleaseRef as std::str::FromStr>::from_str(value) {
std::result::Result::Ok(value) => {
std::result::Result::Ok(header::IntoHeaderValue(value))
}
std::result::Result::Err(err) => std::result::Result::Err(format!(
- "Unable to convert header value '{}' into Success - {}",
+ "Unable to convert header value '{}' into ReleaseRef - {}",
value, err
)),
}
@@ -6471,12 +6561,13 @@ impl std::str::FromStr for Success {
if let Some(key) = key_result {
match key {
- "success" => intermediate_rep
- .success
- .push(bool::from_str(val).map_err(|x| format!("{}", x))?),
- "message" => intermediate_rep
- .message
- .push(String::from_str(val).map_err(|x| format!("{}", x))?),
+ "success" => intermediate_rep.success.push(
+ <bool as std::str::FromStr>::from_str(val).map_err(|x| format!("{}", x))?,
+ ),
+ "message" => intermediate_rep.message.push(
+ <String as std::str::FromStr>::from_str(val)
+ .map_err(|x| format!("{}", x))?,
+ ),
_ => {
return std::result::Result::Err(
"Unexpected key while parsing Success".to_string(),
@@ -6505,22 +6596,20 @@ impl std::str::FromStr for Success {
}
}
-// Methods for converting between header::IntoHeaderValue<WebcaptureAutoBatch> and hyper::header::HeaderValue
+// Methods for converting between header::IntoHeaderValue<Success> and hyper::header::HeaderValue
#[cfg(any(feature = "client", feature = "server"))]
-impl std::convert::TryFrom<header::IntoHeaderValue<WebcaptureAutoBatch>>
- for hyper::header::HeaderValue
-{
+impl std::convert::TryFrom<header::IntoHeaderValue<Success>> for hyper::header::HeaderValue {
type Error = String;
fn try_from(
- hdr_value: header::IntoHeaderValue<WebcaptureAutoBatch>,
+ hdr_value: header::IntoHeaderValue<Success>,
) -> std::result::Result<Self, Self::Error> {
let hdr_value = hdr_value.to_string();
match hyper::header::HeaderValue::from_str(&hdr_value) {
std::result::Result::Ok(value) => std::result::Result::Ok(value),
std::result::Result::Err(e) => std::result::Result::Err(format!(
- "Invalid header value for WebcaptureAutoBatch - value: {} is invalid {}",
+ "Invalid header value for Success - value: {} is invalid {}",
hdr_value, e
)),
}
@@ -6528,20 +6617,18 @@ impl std::convert::TryFrom<header::IntoHeaderValue<WebcaptureAutoBatch>>
}
#[cfg(any(feature = "client", feature = "server"))]
-impl std::convert::TryFrom<hyper::header::HeaderValue>
- for header::IntoHeaderValue<WebcaptureAutoBatch>
-{
+impl std::convert::TryFrom<hyper::header::HeaderValue> for header::IntoHeaderValue<Success> {
type Error = String;
fn try_from(hdr_value: hyper::header::HeaderValue) -> std::result::Result<Self, Self::Error> {
match hdr_value.to_str() {
std::result::Result::Ok(value) => {
- match <WebcaptureAutoBatch as std::str::FromStr>::from_str(value) {
+ match <Success as std::str::FromStr>::from_str(value) {
std::result::Result::Ok(value) => {
std::result::Result::Ok(header::IntoHeaderValue(value))
}
std::result::Result::Err(err) => std::result::Result::Err(format!(
- "Unable to convert header value '{}' into WebcaptureAutoBatch - {}",
+ "Unable to convert header value '{}' into Success - {}",
value, err
)),
}
@@ -6622,9 +6709,10 @@ impl std::str::FromStr for WebcaptureAutoBatch {
if let Some(key) = key_result {
match key {
- "editgroup" => intermediate_rep
- .editgroup
- .push(models::Editgroup::from_str(val).map_err(|x| format!("{}", x))?),
+ "editgroup" => intermediate_rep.editgroup.push(
+ <models::Editgroup as std::str::FromStr>::from_str(val)
+ .map_err(|x| format!("{}", x))?,
+ ),
"entity_list" => return std::result::Result::Err(
"Parsing a container in this style is not supported in WebcaptureAutoBatch"
.to_string(),
@@ -6657,22 +6745,22 @@ impl std::str::FromStr for WebcaptureAutoBatch {
}
}
-// Methods for converting between header::IntoHeaderValue<WebcaptureCdxLine> and hyper::header::HeaderValue
+// Methods for converting between header::IntoHeaderValue<WebcaptureAutoBatch> and hyper::header::HeaderValue
#[cfg(any(feature = "client", feature = "server"))]
-impl std::convert::TryFrom<header::IntoHeaderValue<WebcaptureCdxLine>>
+impl std::convert::TryFrom<header::IntoHeaderValue<WebcaptureAutoBatch>>
for hyper::header::HeaderValue
{
type Error = String;
fn try_from(
- hdr_value: header::IntoHeaderValue<WebcaptureCdxLine>,
+ hdr_value: header::IntoHeaderValue<WebcaptureAutoBatch>,
) -> std::result::Result<Self, Self::Error> {
let hdr_value = hdr_value.to_string();
match hyper::header::HeaderValue::from_str(&hdr_value) {
std::result::Result::Ok(value) => std::result::Result::Ok(value),
std::result::Result::Err(e) => std::result::Result::Err(format!(
- "Invalid header value for WebcaptureCdxLine - value: {} is invalid {}",
+ "Invalid header value for WebcaptureAutoBatch - value: {} is invalid {}",
hdr_value, e
)),
}
@@ -6681,19 +6769,19 @@ impl std::convert::TryFrom<header::IntoHeaderValue<WebcaptureCdxLine>>
#[cfg(any(feature = "client", feature = "server"))]
impl std::convert::TryFrom<hyper::header::HeaderValue>
- for header::IntoHeaderValue<WebcaptureCdxLine>
+ for header::IntoHeaderValue<WebcaptureAutoBatch>
{
type Error = String;
fn try_from(hdr_value: hyper::header::HeaderValue) -> std::result::Result<Self, Self::Error> {
match hdr_value.to_str() {
std::result::Result::Ok(value) => {
- match <WebcaptureCdxLine as std::str::FromStr>::from_str(value) {
+ match <WebcaptureAutoBatch as std::str::FromStr>::from_str(value) {
std::result::Result::Ok(value) => {
std::result::Result::Ok(header::IntoHeaderValue(value))
}
std::result::Result::Err(err) => std::result::Result::Err(format!(
- "Unable to convert header value '{}' into WebcaptureCdxLine - {}",
+ "Unable to convert header value '{}' into WebcaptureAutoBatch - {}",
value, err
)),
}
@@ -6846,31 +6934,36 @@ impl std::str::FromStr for WebcaptureCdxLine {
if let Some(key) = key_result {
match key {
- "surt" => intermediate_rep
- .surt
- .push(String::from_str(val).map_err(|x| format!("{}", x))?),
+ "surt" => intermediate_rep.surt.push(
+ <String as std::str::FromStr>::from_str(val)
+ .map_err(|x| format!("{}", x))?,
+ ),
"timestamp" => intermediate_rep.timestamp.push(
- chrono::DateTime::<chrono::Utc>::from_str(val)
- .map_err(|x| format!("{}", x))?,
- ),
- "url" => intermediate_rep
- .url
- .push(String::from_str(val).map_err(|x| format!("{}", x))?),
- "mimetype" => intermediate_rep
- .mimetype
- .push(String::from_str(val).map_err(|x| format!("{}", x))?),
- "status_code" => intermediate_rep
- .status_code
- .push(i64::from_str(val).map_err(|x| format!("{}", x))?),
- "size" => intermediate_rep
- .size
- .push(i64::from_str(val).map_err(|x| format!("{}", x))?),
- "sha1" => intermediate_rep
- .sha1
- .push(String::from_str(val).map_err(|x| format!("{}", x))?),
- "sha256" => intermediate_rep
- .sha256
- .push(String::from_str(val).map_err(|x| format!("{}", x))?),
+ <chrono::DateTime<chrono::Utc> as std::str::FromStr>::from_str(val)
+ .map_err(|x| format!("{}", x))?,
+ ),
+ "url" => intermediate_rep.url.push(
+ <String as std::str::FromStr>::from_str(val)
+ .map_err(|x| format!("{}", x))?,
+ ),
+ "mimetype" => intermediate_rep.mimetype.push(
+ <String as std::str::FromStr>::from_str(val)
+ .map_err(|x| format!("{}", x))?,
+ ),
+ "status_code" => intermediate_rep.status_code.push(
+ <i64 as std::str::FromStr>::from_str(val).map_err(|x| format!("{}", x))?,
+ ),
+ "size" => intermediate_rep.size.push(
+ <i64 as std::str::FromStr>::from_str(val).map_err(|x| format!("{}", x))?,
+ ),
+ "sha1" => intermediate_rep.sha1.push(
+ <String as std::str::FromStr>::from_str(val)
+ .map_err(|x| format!("{}", x))?,
+ ),
+ "sha256" => intermediate_rep.sha256.push(
+ <String as std::str::FromStr>::from_str(val)
+ .map_err(|x| format!("{}", x))?,
+ ),
_ => {
return std::result::Result::Err(
"Unexpected key while parsing WebcaptureCdxLine".to_string(),
@@ -6913,22 +7006,22 @@ impl std::str::FromStr for WebcaptureCdxLine {
}
}
-// Methods for converting between header::IntoHeaderValue<WebcaptureEntity> and hyper::header::HeaderValue
+// Methods for converting between header::IntoHeaderValue<WebcaptureCdxLine> and hyper::header::HeaderValue
#[cfg(any(feature = "client", feature = "server"))]
-impl std::convert::TryFrom<header::IntoHeaderValue<WebcaptureEntity>>
+impl std::convert::TryFrom<header::IntoHeaderValue<WebcaptureCdxLine>>
for hyper::header::HeaderValue
{
type Error = String;
fn try_from(
- hdr_value: header::IntoHeaderValue<WebcaptureEntity>,
+ hdr_value: header::IntoHeaderValue<WebcaptureCdxLine>,
) -> std::result::Result<Self, Self::Error> {
let hdr_value = hdr_value.to_string();
match hyper::header::HeaderValue::from_str(&hdr_value) {
std::result::Result::Ok(value) => std::result::Result::Ok(value),
std::result::Result::Err(e) => std::result::Result::Err(format!(
- "Invalid header value for WebcaptureEntity - value: {} is invalid {}",
+ "Invalid header value for WebcaptureCdxLine - value: {} is invalid {}",
hdr_value, e
)),
}
@@ -6937,19 +7030,19 @@ impl std::convert::TryFrom<header::IntoHeaderValue<WebcaptureEntity>>
#[cfg(any(feature = "client", feature = "server"))]
impl std::convert::TryFrom<hyper::header::HeaderValue>
- for header::IntoHeaderValue<WebcaptureEntity>
+ for header::IntoHeaderValue<WebcaptureCdxLine>
{
type Error = String;
fn try_from(hdr_value: hyper::header::HeaderValue) -> std::result::Result<Self, Self::Error> {
match hdr_value.to_str() {
std::result::Result::Ok(value) => {
- match <WebcaptureEntity as std::str::FromStr>::from_str(value) {
+ match <WebcaptureCdxLine as std::str::FromStr>::from_str(value) {
std::result::Result::Ok(value) => {
std::result::Result::Ok(header::IntoHeaderValue(value))
}
std::result::Result::Err(err) => std::result::Result::Err(format!(
- "Unable to convert header value '{}' into WebcaptureEntity - {}",
+ "Unable to convert header value '{}' into WebcaptureCdxLine - {}",
value, err
)),
}
@@ -7158,18 +7251,22 @@ impl std::str::FromStr for WebcaptureEntity {
if let Some(key) = key_result {
match key {
- "state" => intermediate_rep
- .state
- .push(String::from_str(val).map_err(|x| format!("{}", x))?),
- "ident" => intermediate_rep
- .ident
- .push(String::from_str(val).map_err(|x| format!("{}", x))?),
- "revision" => intermediate_rep
- .revision
- .push(String::from_str(val).map_err(|x| format!("{}", x))?),
- "redirect" => intermediate_rep
- .redirect
- .push(String::from_str(val).map_err(|x| format!("{}", x))?),
+ "state" => intermediate_rep.state.push(
+ <String as std::str::FromStr>::from_str(val)
+ .map_err(|x| format!("{}", x))?,
+ ),
+ "ident" => intermediate_rep.ident.push(
+ <String as std::str::FromStr>::from_str(val)
+ .map_err(|x| format!("{}", x))?,
+ ),
+ "revision" => intermediate_rep.revision.push(
+ <String as std::str::FromStr>::from_str(val)
+ .map_err(|x| format!("{}", x))?,
+ ),
+ "redirect" => intermediate_rep.redirect.push(
+ <String as std::str::FromStr>::from_str(val)
+ .map_err(|x| format!("{}", x))?,
+ ),
"extra" => return std::result::Result::Err(
"Parsing a container in this style is not supported in WebcaptureEntity"
.to_string(),
@@ -7186,16 +7283,18 @@ impl std::str::FromStr for WebcaptureEntity {
"Parsing a container in this style is not supported in WebcaptureEntity"
.to_string(),
),
- "original_url" => intermediate_rep
- .original_url
- .push(String::from_str(val).map_err(|x| format!("{}", x))?),
+ "original_url" => intermediate_rep.original_url.push(
+ <String as std::str::FromStr>::from_str(val)
+ .map_err(|x| format!("{}", x))?,
+ ),
"timestamp" => intermediate_rep.timestamp.push(
- chrono::DateTime::<chrono::Utc>::from_str(val)
+ <chrono::DateTime<chrono::Utc> as std::str::FromStr>::from_str(val)
+ .map_err(|x| format!("{}", x))?,
+ ),
+ "content_scope" => intermediate_rep.content_scope.push(
+ <String as std::str::FromStr>::from_str(val)
.map_err(|x| format!("{}", x))?,
),
- "content_scope" => intermediate_rep
- .content_scope
- .push(String::from_str(val).map_err(|x| format!("{}", x))?),
"release_ids" => return std::result::Result::Err(
"Parsing a container in this style is not supported in WebcaptureEntity"
.to_string(),
@@ -7235,20 +7334,22 @@ impl std::str::FromStr for WebcaptureEntity {
}
}
-// Methods for converting between header::IntoHeaderValue<WebcaptureUrl> and hyper::header::HeaderValue
+// Methods for converting between header::IntoHeaderValue<WebcaptureEntity> and hyper::header::HeaderValue
#[cfg(any(feature = "client", feature = "server"))]
-impl std::convert::TryFrom<header::IntoHeaderValue<WebcaptureUrl>> for hyper::header::HeaderValue {
+impl std::convert::TryFrom<header::IntoHeaderValue<WebcaptureEntity>>
+ for hyper::header::HeaderValue
+{
type Error = String;
fn try_from(
- hdr_value: header::IntoHeaderValue<WebcaptureUrl>,
+ hdr_value: header::IntoHeaderValue<WebcaptureEntity>,
) -> std::result::Result<Self, Self::Error> {
let hdr_value = hdr_value.to_string();
match hyper::header::HeaderValue::from_str(&hdr_value) {
std::result::Result::Ok(value) => std::result::Result::Ok(value),
std::result::Result::Err(e) => std::result::Result::Err(format!(
- "Invalid header value for WebcaptureUrl - value: {} is invalid {}",
+ "Invalid header value for WebcaptureEntity - value: {} is invalid {}",
hdr_value, e
)),
}
@@ -7256,18 +7357,20 @@ impl std::convert::TryFrom<header::IntoHeaderValue<WebcaptureUrl>> for hyper::he
}
#[cfg(any(feature = "client", feature = "server"))]
-impl std::convert::TryFrom<hyper::header::HeaderValue> for header::IntoHeaderValue<WebcaptureUrl> {
+impl std::convert::TryFrom<hyper::header::HeaderValue>
+ for header::IntoHeaderValue<WebcaptureEntity>
+{
type Error = String;
fn try_from(hdr_value: hyper::header::HeaderValue) -> std::result::Result<Self, Self::Error> {
match hdr_value.to_str() {
std::result::Result::Ok(value) => {
- match <WebcaptureUrl as std::str::FromStr>::from_str(value) {
+ match <WebcaptureEntity as std::str::FromStr>::from_str(value) {
std::result::Result::Ok(value) => {
std::result::Result::Ok(header::IntoHeaderValue(value))
}
std::result::Result::Err(err) => std::result::Result::Err(format!(
- "Unable to convert header value '{}' into WebcaptureUrl - {}",
+ "Unable to convert header value '{}' into WebcaptureEntity - {}",
value, err
)),
}
@@ -7347,12 +7450,14 @@ impl std::str::FromStr for WebcaptureUrl {
if let Some(key) = key_result {
match key {
- "url" => intermediate_rep
- .url
- .push(String::from_str(val).map_err(|x| format!("{}", x))?),
- "rel" => intermediate_rep
- .rel
- .push(String::from_str(val).map_err(|x| format!("{}", x))?),
+ "url" => intermediate_rep.url.push(
+ <String as std::str::FromStr>::from_str(val)
+ .map_err(|x| format!("{}", x))?,
+ ),
+ "rel" => intermediate_rep.rel.push(
+ <String as std::str::FromStr>::from_str(val)
+ .map_err(|x| format!("{}", x))?,
+ ),
_ => {
return std::result::Result::Err(
"Unexpected key while parsing WebcaptureUrl".to_string(),
@@ -7381,20 +7486,20 @@ impl std::str::FromStr for WebcaptureUrl {
}
}
-// Methods for converting between header::IntoHeaderValue<WorkAutoBatch> and hyper::header::HeaderValue
+// Methods for converting between header::IntoHeaderValue<WebcaptureUrl> and hyper::header::HeaderValue
#[cfg(any(feature = "client", feature = "server"))]
-impl std::convert::TryFrom<header::IntoHeaderValue<WorkAutoBatch>> for hyper::header::HeaderValue {
+impl std::convert::TryFrom<header::IntoHeaderValue<WebcaptureUrl>> for hyper::header::HeaderValue {
type Error = String;
fn try_from(
- hdr_value: header::IntoHeaderValue<WorkAutoBatch>,
+ hdr_value: header::IntoHeaderValue<WebcaptureUrl>,
) -> std::result::Result<Self, Self::Error> {
let hdr_value = hdr_value.to_string();
match hyper::header::HeaderValue::from_str(&hdr_value) {
std::result::Result::Ok(value) => std::result::Result::Ok(value),
std::result::Result::Err(e) => std::result::Result::Err(format!(
- "Invalid header value for WorkAutoBatch - value: {} is invalid {}",
+ "Invalid header value for WebcaptureUrl - value: {} is invalid {}",
hdr_value, e
)),
}
@@ -7402,18 +7507,18 @@ impl std::convert::TryFrom<header::IntoHeaderValue<WorkAutoBatch>> for hyper::he
}
#[cfg(any(feature = "client", feature = "server"))]
-impl std::convert::TryFrom<hyper::header::HeaderValue> for header::IntoHeaderValue<WorkAutoBatch> {
+impl std::convert::TryFrom<hyper::header::HeaderValue> for header::IntoHeaderValue<WebcaptureUrl> {
type Error = String;
fn try_from(hdr_value: hyper::header::HeaderValue) -> std::result::Result<Self, Self::Error> {
match hdr_value.to_str() {
std::result::Result::Ok(value) => {
- match <WorkAutoBatch as std::str::FromStr>::from_str(value) {
+ match <WebcaptureUrl as std::str::FromStr>::from_str(value) {
std::result::Result::Ok(value) => {
std::result::Result::Ok(header::IntoHeaderValue(value))
}
std::result::Result::Err(err) => std::result::Result::Err(format!(
- "Unable to convert header value '{}' into WorkAutoBatch - {}",
+ "Unable to convert header value '{}' into WebcaptureUrl - {}",
value, err
)),
}
@@ -7494,9 +7599,10 @@ impl std::str::FromStr for WorkAutoBatch {
if let Some(key) = key_result {
match key {
- "editgroup" => intermediate_rep
- .editgroup
- .push(models::Editgroup::from_str(val).map_err(|x| format!("{}", x))?),
+ "editgroup" => intermediate_rep.editgroup.push(
+ <models::Editgroup as std::str::FromStr>::from_str(val)
+ .map_err(|x| format!("{}", x))?,
+ ),
"entity_list" => {
return std::result::Result::Err(
"Parsing a container in this style is not supported in WorkAutoBatch"
@@ -7531,20 +7637,20 @@ impl std::str::FromStr for WorkAutoBatch {
}
}
-// Methods for converting between header::IntoHeaderValue<WorkEntity> and hyper::header::HeaderValue
+// Methods for converting between header::IntoHeaderValue<WorkAutoBatch> and hyper::header::HeaderValue
#[cfg(any(feature = "client", feature = "server"))]
-impl std::convert::TryFrom<header::IntoHeaderValue<WorkEntity>> for hyper::header::HeaderValue {
+impl std::convert::TryFrom<header::IntoHeaderValue<WorkAutoBatch>> for hyper::header::HeaderValue {
type Error = String;
fn try_from(
- hdr_value: header::IntoHeaderValue<WorkEntity>,
+ hdr_value: header::IntoHeaderValue<WorkAutoBatch>,
) -> std::result::Result<Self, Self::Error> {
let hdr_value = hdr_value.to_string();
match hyper::header::HeaderValue::from_str(&hdr_value) {
std::result::Result::Ok(value) => std::result::Result::Ok(value),
std::result::Result::Err(e) => std::result::Result::Err(format!(
- "Invalid header value for WorkEntity - value: {} is invalid {}",
+ "Invalid header value for WorkAutoBatch - value: {} is invalid {}",
hdr_value, e
)),
}
@@ -7552,18 +7658,18 @@ impl std::convert::TryFrom<header::IntoHeaderValue<WorkEntity>> for hyper::heade
}
#[cfg(any(feature = "client", feature = "server"))]
-impl std::convert::TryFrom<hyper::header::HeaderValue> for header::IntoHeaderValue<WorkEntity> {
+impl std::convert::TryFrom<hyper::header::HeaderValue> for header::IntoHeaderValue<WorkAutoBatch> {
type Error = String;
fn try_from(hdr_value: hyper::header::HeaderValue) -> std::result::Result<Self, Self::Error> {
match hdr_value.to_str() {
std::result::Result::Ok(value) => {
- match <WorkEntity as std::str::FromStr>::from_str(value) {
+ match <WorkAutoBatch as std::str::FromStr>::from_str(value) {
std::result::Result::Ok(value) => {
std::result::Result::Ok(header::IntoHeaderValue(value))
}
std::result::Result::Err(err) => std::result::Result::Err(format!(
- "Unable to convert header value '{}' into WorkEntity - {}",
+ "Unable to convert header value '{}' into WorkAutoBatch - {}",
value, err
)),
}
@@ -7696,18 +7802,22 @@ impl std::str::FromStr for WorkEntity {
if let Some(key) = key_result {
match key {
- "state" => intermediate_rep
- .state
- .push(String::from_str(val).map_err(|x| format!("{}", x))?),
- "ident" => intermediate_rep
- .ident
- .push(String::from_str(val).map_err(|x| format!("{}", x))?),
- "revision" => intermediate_rep
- .revision
- .push(String::from_str(val).map_err(|x| format!("{}", x))?),
- "redirect" => intermediate_rep
- .redirect
- .push(String::from_str(val).map_err(|x| format!("{}", x))?),
+ "state" => intermediate_rep.state.push(
+ <String as std::str::FromStr>::from_str(val)
+ .map_err(|x| format!("{}", x))?,
+ ),
+ "ident" => intermediate_rep.ident.push(
+ <String as std::str::FromStr>::from_str(val)
+ .map_err(|x| format!("{}", x))?,
+ ),
+ "revision" => intermediate_rep.revision.push(
+ <String as std::str::FromStr>::from_str(val)
+ .map_err(|x| format!("{}", x))?,
+ ),
+ "redirect" => intermediate_rep.redirect.push(
+ <String as std::str::FromStr>::from_str(val)
+ .map_err(|x| format!("{}", x))?,
+ ),
"extra" => {
return std::result::Result::Err(
"Parsing a container in this style is not supported in WorkEntity"
@@ -7743,3 +7853,48 @@ impl std::str::FromStr for WorkEntity {
})
}
}
+
+// Methods for converting between header::IntoHeaderValue<WorkEntity> and hyper::header::HeaderValue
+
+#[cfg(any(feature = "client", feature = "server"))]
+impl std::convert::TryFrom<header::IntoHeaderValue<WorkEntity>> for hyper::header::HeaderValue {
+ type Error = String;
+
+ fn try_from(
+ hdr_value: header::IntoHeaderValue<WorkEntity>,
+ ) -> std::result::Result<Self, Self::Error> {
+ let hdr_value = hdr_value.to_string();
+ match hyper::header::HeaderValue::from_str(&hdr_value) {
+ std::result::Result::Ok(value) => std::result::Result::Ok(value),
+ std::result::Result::Err(e) => std::result::Result::Err(format!(
+ "Invalid header value for WorkEntity - value: {} is invalid {}",
+ hdr_value, e
+ )),
+ }
+ }
+}
+
+#[cfg(any(feature = "client", feature = "server"))]
+impl std::convert::TryFrom<hyper::header::HeaderValue> for header::IntoHeaderValue<WorkEntity> {
+ type Error = String;
+
+ fn try_from(hdr_value: hyper::header::HeaderValue) -> std::result::Result<Self, Self::Error> {
+ match hdr_value.to_str() {
+ std::result::Result::Ok(value) => {
+ match <WorkEntity as std::str::FromStr>::from_str(value) {
+ std::result::Result::Ok(value) => {
+ std::result::Result::Ok(header::IntoHeaderValue(value))
+ }
+ std::result::Result::Err(err) => std::result::Result::Err(format!(
+ "Unable to convert header value '{}' into WorkEntity - {}",
+ value, err
+ )),
+ }
+ }
+ std::result::Result::Err(e) => std::result::Result::Err(format!(
+ "Unable to convert header: {:?} to string: {}",
+ hdr_value, e
+ )),
+ }
+ }
+}
diff --git a/fatcat-openapi/src/server/mod.rs b/fatcat-openapi/src/server/mod.rs
index 251c678..56a5fc2 100644
--- a/fatcat-openapi/src/server/mod.rs
+++ b/fatcat-openapi/src/server/mod.rs
@@ -1048,7 +1048,7 @@ where
// Body parameters (note that non-required body parameters will ignore garbage
// values, rather than causing a 400 response). Produce warning header and logs for
// any unused fields.
- let result = body.to_raw().await;
+ let result = body.into_raw().await;
match result {
Ok(body) => {
let mut unused_elements = Vec::new();
@@ -1420,7 +1420,7 @@ where
// Body parameters (note that non-required body parameters will ignore garbage
// values, rather than causing a 400 response). Produce warning header and logs for
// any unused fields.
- let result = body.to_raw().await;
+ let result = body.into_raw().await;
match result {
Ok(body) => {
let mut unused_elements = Vec::new();
@@ -1589,7 +1589,7 @@ where
// Body parameters (note that non-required body parameters will ignore garbage
// values, rather than causing a 400 response). Produce warning header and logs for
// any unused fields.
- let result = body.to_raw().await;
+ let result = body.into_raw().await;
match result {
Ok(body) => {
let mut unused_elements = Vec::new();
@@ -1780,7 +1780,7 @@ where
// Body parameters (note that non-required body parameters will ignore garbage
// values, rather than causing a 400 response). Produce warning header and logs for
// any unused fields.
- let result = body.to_raw().await;
+ let result = body.into_raw().await;
match result {
Ok(body) => {
let mut unused_elements = Vec::new();
@@ -1949,7 +1949,7 @@ where
// Body parameters (note that non-required body parameters will ignore garbage
// values, rather than causing a 400 response). Produce warning header and logs for
// any unused fields.
- let result = body.to_raw().await;
+ let result = body.into_raw().await;
match result {
Ok(body) => {
let mut unused_elements = Vec::new();
@@ -2117,7 +2117,7 @@ where
// Body parameters (note that non-required body parameters will ignore garbage
// values, rather than causing a 400 response). Produce warning header and logs for
// any unused fields.
- let result = body.to_raw().await;
+ let result = body.into_raw().await;
match result {
Ok(body) => {
let mut unused_elements = Vec::new();
@@ -2310,7 +2310,7 @@ where
// Body parameters (note that non-required body parameters will ignore garbage
// values, rather than causing a 400 response). Produce warning header and logs for
// any unused fields.
- let result = body.to_raw().await;
+ let result = body.into_raw().await;
match result {
Ok(body) => {
let mut unused_elements = Vec::new();
@@ -2502,7 +2502,7 @@ where
// Body parameters (note that non-required body parameters will ignore garbage
// values, rather than causing a 400 response). Produce warning header and logs for
// any unused fields.
- let result = body.to_raw().await;
+ let result = body.into_raw().await;
match result {
Ok(body) => {
let mut unused_elements = Vec::new();
@@ -2671,7 +2671,7 @@ where
// Body parameters (note that non-required body parameters will ignore garbage
// values, rather than causing a 400 response). Produce warning header and logs for
// any unused fields.
- let result = body.to_raw().await;
+ let result = body.into_raw().await;
match result {
Ok(body) => {
let mut unused_elements = Vec::new();
@@ -2862,7 +2862,7 @@ where
// Body parameters (note that non-required body parameters will ignore garbage
// values, rather than causing a 400 response). Produce warning header and logs for
// any unused fields.
- let result = body.to_raw().await;
+ let result = body.into_raw().await;
match result {
Ok(body) => {
let mut unused_elements = Vec::new();
@@ -3031,7 +3031,7 @@ where
// Body parameters (note that non-required body parameters will ignore garbage
// values, rather than causing a 400 response). Produce warning header and logs for
// any unused fields.
- let result = body.to_raw().await;
+ let result = body.into_raw().await;
match result {
Ok(body) => {
let mut unused_elements = Vec::new();
@@ -3222,7 +3222,7 @@ where
// Body parameters (note that non-required body parameters will ignore garbage
// values, rather than causing a 400 response). Produce warning header and logs for
// any unused fields.
- let result = body.to_raw().await;
+ let result = body.into_raw().await;
match result {
Ok(body) => {
let mut unused_elements = Vec::new();
@@ -3391,7 +3391,7 @@ where
// Body parameters (note that non-required body parameters will ignore garbage
// values, rather than causing a 400 response). Produce warning header and logs for
// any unused fields.
- let result = body.to_raw().await;
+ let result = body.into_raw().await;
match result {
Ok(body) => {
let mut unused_elements = Vec::new();
@@ -3584,7 +3584,7 @@ where
// Body parameters (note that non-required body parameters will ignore garbage
// values, rather than causing a 400 response). Produce warning header and logs for
// any unused fields.
- let result = body.to_raw().await;
+ let result = body.into_raw().await;
match result {
Ok(body) => {
let mut unused_elements = Vec::new();
@@ -3753,7 +3753,7 @@ where
// Body parameters (note that non-required body parameters will ignore garbage
// values, rather than causing a 400 response). Produce warning header and logs for
// any unused fields.
- let result = body.to_raw().await;
+ let result = body.into_raw().await;
match result {
Ok(body) => {
let mut unused_elements = Vec::new();
@@ -3944,7 +3944,7 @@ where
// Body parameters (note that non-required body parameters will ignore garbage
// values, rather than causing a 400 response). Produce warning header and logs for
// any unused fields.
- let result = body.to_raw().await;
+ let result = body.into_raw().await;
match result {
Ok(body) => {
let mut unused_elements = Vec::new();
@@ -4113,7 +4113,7 @@ where
// Body parameters (note that non-required body parameters will ignore garbage
// values, rather than causing a 400 response). Produce warning header and logs for
// any unused fields.
- let result = body.to_raw().await;
+ let result = body.into_raw().await;
match result {
Ok(body) => {
let mut unused_elements = Vec::new();
@@ -13706,7 +13706,7 @@ where
// Body parameters (note that non-required body parameters will ignore garbage
// values, rather than causing a 400 response). Produce warning header and logs for
// any unused fields.
- let result = body.to_raw().await;
+ let result = body.into_raw().await;
match result {
Ok(body) => {
let mut unused_elements = Vec::new();
@@ -13915,7 +13915,7 @@ where
// Body parameters (note that non-required body parameters will ignore garbage
// values, rather than causing a 400 response). Produce warning header and logs for
// any unused fields.
- let result = body.to_raw().await;
+ let result = body.into_raw().await;
match result {
Ok(body) => {
let mut unused_elements = Vec::new();
@@ -14131,7 +14131,7 @@ where
// Body parameters (note that non-required body parameters will ignore garbage
// values, rather than causing a 400 response). Produce warning header and logs for
// any unused fields.
- let result = body.to_raw().await;
+ let result = body.into_raw().await;
match result {
Ok(body) => {
let mut unused_elements = Vec::new();
@@ -14324,7 +14324,7 @@ where
// Body parameters (note that non-required body parameters will ignore garbage
// values, rather than causing a 400 response). Produce warning header and logs for
// any unused fields.
- let result = body.to_raw().await;
+ let result = body.into_raw().await;
match result {
Ok(body) => {
let mut unused_elements = Vec::new();
@@ -14532,7 +14532,7 @@ where
// Body parameters (note that non-required body parameters will ignore garbage
// values, rather than causing a 400 response). Produce warning header and logs for
// any unused fields.
- let result = body.to_raw().await;
+ let result = body.into_raw().await;
match result {
Ok(body) => {
let mut unused_elements = Vec::new();
@@ -14741,7 +14741,7 @@ where
// Body parameters (note that non-required body parameters will ignore garbage
// values, rather than causing a 400 response). Produce warning header and logs for
// any unused fields.
- let result = body.to_raw().await;
+ let result = body.into_raw().await;
match result {
Ok(body) => {
let mut unused_elements = Vec::new();
@@ -14950,7 +14950,7 @@ where
// Body parameters (note that non-required body parameters will ignore garbage
// values, rather than causing a 400 response). Produce warning header and logs for
// any unused fields.
- let result = body.to_raw().await;
+ let result = body.into_raw().await;
match result {
Ok(body) => {
let mut unused_elements = Vec::new();
@@ -15159,7 +15159,7 @@ where
// Body parameters (note that non-required body parameters will ignore garbage
// values, rather than causing a 400 response). Produce warning header and logs for
// any unused fields.
- let result = body.to_raw().await;
+ let result = body.into_raw().await;
match result {
Ok(body) => {
let mut unused_elements = Vec::new();
@@ -15368,7 +15368,7 @@ where
// Body parameters (note that non-required body parameters will ignore garbage
// values, rather than causing a 400 response). Produce warning header and logs for
// any unused fields.
- let result = body.to_raw().await;
+ let result = body.into_raw().await;
match result {
Ok(body) => {
let mut unused_elements = Vec::new();
@@ -15657,380 +15657,386 @@ where
/// Request parser for `Api`.
pub struct ApiRequestParser;
impl<T> RequestParser<T> for ApiRequestParser {
- fn parse_operation_id(request: &Request<T>) -> Result<&'static str, ()> {
+ fn parse_operation_id(request: &Request<T>) -> Option<&'static str> {
let path = paths::GLOBAL_REGEX_SET.matches(request.uri().path());
match request.method() {
// AcceptEditgroup - POST /editgroup/{editgroup_id}/accept
&hyper::Method::POST if path.matched(paths::ID_EDITGROUP_EDITGROUP_ID_ACCEPT) => {
- Ok("AcceptEditgroup")
+ Some("AcceptEditgroup")
}
// AuthCheck - GET /auth/check
- &hyper::Method::GET if path.matched(paths::ID_AUTH_CHECK) => Ok("AuthCheck"),
+ &hyper::Method::GET if path.matched(paths::ID_AUTH_CHECK) => Some("AuthCheck"),
// AuthOidc - POST /auth/oidc
- &hyper::Method::POST if path.matched(paths::ID_AUTH_OIDC) => Ok("AuthOidc"),
+ &hyper::Method::POST if path.matched(paths::ID_AUTH_OIDC) => Some("AuthOidc"),
// CreateAuthToken - POST /auth/token/{editor_id}
&hyper::Method::POST if path.matched(paths::ID_AUTH_TOKEN_EDITOR_ID) => {
- Ok("CreateAuthToken")
+ Some("CreateAuthToken")
}
// CreateContainer - POST /editgroup/{editgroup_id}/container
&hyper::Method::POST if path.matched(paths::ID_EDITGROUP_EDITGROUP_ID_CONTAINER) => {
- Ok("CreateContainer")
+ Some("CreateContainer")
}
// CreateContainerAutoBatch - POST /editgroup/auto/container/batch
&hyper::Method::POST if path.matched(paths::ID_EDITGROUP_AUTO_CONTAINER_BATCH) => {
- Ok("CreateContainerAutoBatch")
+ Some("CreateContainerAutoBatch")
}
// CreateCreator - POST /editgroup/{editgroup_id}/creator
&hyper::Method::POST if path.matched(paths::ID_EDITGROUP_EDITGROUP_ID_CREATOR) => {
- Ok("CreateCreator")
+ Some("CreateCreator")
}
// CreateCreatorAutoBatch - POST /editgroup/auto/creator/batch
&hyper::Method::POST if path.matched(paths::ID_EDITGROUP_AUTO_CREATOR_BATCH) => {
- Ok("CreateCreatorAutoBatch")
+ Some("CreateCreatorAutoBatch")
}
// CreateEditgroup - POST /editgroup
- &hyper::Method::POST if path.matched(paths::ID_EDITGROUP) => Ok("CreateEditgroup"),
+ &hyper::Method::POST if path.matched(paths::ID_EDITGROUP) => Some("CreateEditgroup"),
// CreateEditgroupAnnotation - POST /editgroup/{editgroup_id}/annotation
&hyper::Method::POST if path.matched(paths::ID_EDITGROUP_EDITGROUP_ID_ANNOTATION) => {
- Ok("CreateEditgroupAnnotation")
+ Some("CreateEditgroupAnnotation")
}
// CreateFile - POST /editgroup/{editgroup_id}/file
&hyper::Method::POST if path.matched(paths::ID_EDITGROUP_EDITGROUP_ID_FILE) => {
- Ok("CreateFile")
+ Some("CreateFile")
}
// CreateFileAutoBatch - POST /editgroup/auto/file/batch
&hyper::Method::POST if path.matched(paths::ID_EDITGROUP_AUTO_FILE_BATCH) => {
- Ok("CreateFileAutoBatch")
+ Some("CreateFileAutoBatch")
}
// CreateFileset - POST /editgroup/{editgroup_id}/fileset
&hyper::Method::POST if path.matched(paths::ID_EDITGROUP_EDITGROUP_ID_FILESET) => {
- Ok("CreateFileset")
+ Some("CreateFileset")
}
// CreateFilesetAutoBatch - POST /editgroup/auto/fileset/batch
&hyper::Method::POST if path.matched(paths::ID_EDITGROUP_AUTO_FILESET_BATCH) => {
- Ok("CreateFilesetAutoBatch")
+ Some("CreateFilesetAutoBatch")
}
// CreateRelease - POST /editgroup/{editgroup_id}/release
&hyper::Method::POST if path.matched(paths::ID_EDITGROUP_EDITGROUP_ID_RELEASE) => {
- Ok("CreateRelease")
+ Some("CreateRelease")
}
// CreateReleaseAutoBatch - POST /editgroup/auto/release/batch
&hyper::Method::POST if path.matched(paths::ID_EDITGROUP_AUTO_RELEASE_BATCH) => {
- Ok("CreateReleaseAutoBatch")
+ Some("CreateReleaseAutoBatch")
}
// CreateWebcapture - POST /editgroup/{editgroup_id}/webcapture
&hyper::Method::POST if path.matched(paths::ID_EDITGROUP_EDITGROUP_ID_WEBCAPTURE) => {
- Ok("CreateWebcapture")
+ Some("CreateWebcapture")
}
// CreateWebcaptureAutoBatch - POST /editgroup/auto/webcapture/batch
&hyper::Method::POST if path.matched(paths::ID_EDITGROUP_AUTO_WEBCAPTURE_BATCH) => {
- Ok("CreateWebcaptureAutoBatch")
+ Some("CreateWebcaptureAutoBatch")
}
// CreateWork - POST /editgroup/{editgroup_id}/work
&hyper::Method::POST if path.matched(paths::ID_EDITGROUP_EDITGROUP_ID_WORK) => {
- Ok("CreateWork")
+ Some("CreateWork")
}
// CreateWorkAutoBatch - POST /editgroup/auto/work/batch
&hyper::Method::POST if path.matched(paths::ID_EDITGROUP_AUTO_WORK_BATCH) => {
- Ok("CreateWorkAutoBatch")
+ Some("CreateWorkAutoBatch")
}
// DeleteContainer - DELETE /editgroup/{editgroup_id}/container/{ident}
&hyper::Method::DELETE
if path.matched(paths::ID_EDITGROUP_EDITGROUP_ID_CONTAINER_IDENT) =>
{
- Ok("DeleteContainer")
+ Some("DeleteContainer")
}
// DeleteContainerEdit - DELETE /editgroup/{editgroup_id}/container/edit/{edit_id}
&hyper::Method::DELETE
if path.matched(paths::ID_EDITGROUP_EDITGROUP_ID_CONTAINER_EDIT_EDIT_ID) =>
{
- Ok("DeleteContainerEdit")
+ Some("DeleteContainerEdit")
}
// DeleteCreator - DELETE /editgroup/{editgroup_id}/creator/{ident}
&hyper::Method::DELETE
if path.matched(paths::ID_EDITGROUP_EDITGROUP_ID_CREATOR_IDENT) =>
{
- Ok("DeleteCreator")
+ Some("DeleteCreator")
}
// DeleteCreatorEdit - DELETE /editgroup/{editgroup_id}/creator/edit/{edit_id}
&hyper::Method::DELETE
if path.matched(paths::ID_EDITGROUP_EDITGROUP_ID_CREATOR_EDIT_EDIT_ID) =>
{
- Ok("DeleteCreatorEdit")
+ Some("DeleteCreatorEdit")
}
// DeleteFile - DELETE /editgroup/{editgroup_id}/file/{ident}
&hyper::Method::DELETE if path.matched(paths::ID_EDITGROUP_EDITGROUP_ID_FILE_IDENT) => {
- Ok("DeleteFile")
+ Some("DeleteFile")
}
// DeleteFileEdit - DELETE /editgroup/{editgroup_id}/file/edit/{edit_id}
&hyper::Method::DELETE
if path.matched(paths::ID_EDITGROUP_EDITGROUP_ID_FILE_EDIT_EDIT_ID) =>
{
- Ok("DeleteFileEdit")
+ Some("DeleteFileEdit")
}
// DeleteFileset - DELETE /editgroup/{editgroup_id}/fileset/{ident}
&hyper::Method::DELETE
if path.matched(paths::ID_EDITGROUP_EDITGROUP_ID_FILESET_IDENT) =>
{
- Ok("DeleteFileset")
+ Some("DeleteFileset")
}
// DeleteFilesetEdit - DELETE /editgroup/{editgroup_id}/fileset/edit/{edit_id}
&hyper::Method::DELETE
if path.matched(paths::ID_EDITGROUP_EDITGROUP_ID_FILESET_EDIT_EDIT_ID) =>
{
- Ok("DeleteFilesetEdit")
+ Some("DeleteFilesetEdit")
}
// DeleteRelease - DELETE /editgroup/{editgroup_id}/release/{ident}
&hyper::Method::DELETE
if path.matched(paths::ID_EDITGROUP_EDITGROUP_ID_RELEASE_IDENT) =>
{
- Ok("DeleteRelease")
+ Some("DeleteRelease")
}
// DeleteReleaseEdit - DELETE /editgroup/{editgroup_id}/release/edit/{edit_id}
&hyper::Method::DELETE
if path.matched(paths::ID_EDITGROUP_EDITGROUP_ID_RELEASE_EDIT_EDIT_ID) =>
{
- Ok("DeleteReleaseEdit")
+ Some("DeleteReleaseEdit")
}
// DeleteWebcapture - DELETE /editgroup/{editgroup_id}/webcapture/{ident}
&hyper::Method::DELETE
if path.matched(paths::ID_EDITGROUP_EDITGROUP_ID_WEBCAPTURE_IDENT) =>
{
- Ok("DeleteWebcapture")
+ Some("DeleteWebcapture")
}
// DeleteWebcaptureEdit - DELETE /editgroup/{editgroup_id}/webcapture/edit/{edit_id}
&hyper::Method::DELETE
if path.matched(paths::ID_EDITGROUP_EDITGROUP_ID_WEBCAPTURE_EDIT_EDIT_ID) =>
{
- Ok("DeleteWebcaptureEdit")
+ Some("DeleteWebcaptureEdit")
}
// DeleteWork - DELETE /editgroup/{editgroup_id}/work/{ident}
&hyper::Method::DELETE if path.matched(paths::ID_EDITGROUP_EDITGROUP_ID_WORK_IDENT) => {
- Ok("DeleteWork")
+ Some("DeleteWork")
}
// DeleteWorkEdit - DELETE /editgroup/{editgroup_id}/work/edit/{edit_id}
&hyper::Method::DELETE
if path.matched(paths::ID_EDITGROUP_EDITGROUP_ID_WORK_EDIT_EDIT_ID) =>
{
- Ok("DeleteWorkEdit")
+ Some("DeleteWorkEdit")
}
// GetChangelog - GET /changelog
- &hyper::Method::GET if path.matched(paths::ID_CHANGELOG) => Ok("GetChangelog"),
+ &hyper::Method::GET if path.matched(paths::ID_CHANGELOG) => Some("GetChangelog"),
// GetChangelogEntry - GET /changelog/{index}
&hyper::Method::GET if path.matched(paths::ID_CHANGELOG_INDEX) => {
- Ok("GetChangelogEntry")
+ Some("GetChangelogEntry")
}
// GetContainer - GET /container/{ident}
- &hyper::Method::GET if path.matched(paths::ID_CONTAINER_IDENT) => Ok("GetContainer"),
+ &hyper::Method::GET if path.matched(paths::ID_CONTAINER_IDENT) => Some("GetContainer"),
// GetContainerEdit - GET /container/edit/{edit_id}
&hyper::Method::GET if path.matched(paths::ID_CONTAINER_EDIT_EDIT_ID) => {
- Ok("GetContainerEdit")
+ Some("GetContainerEdit")
}
// GetContainerHistory - GET /container/{ident}/history
&hyper::Method::GET if path.matched(paths::ID_CONTAINER_IDENT_HISTORY) => {
- Ok("GetContainerHistory")
+ Some("GetContainerHistory")
}
// GetContainerRedirects - GET /container/{ident}/redirects
&hyper::Method::GET if path.matched(paths::ID_CONTAINER_IDENT_REDIRECTS) => {
- Ok("GetContainerRedirects")
+ Some("GetContainerRedirects")
}
// GetContainerRevision - GET /container/rev/{rev_id}
&hyper::Method::GET if path.matched(paths::ID_CONTAINER_REV_REV_ID) => {
- Ok("GetContainerRevision")
+ Some("GetContainerRevision")
}
// GetCreator - GET /creator/{ident}
- &hyper::Method::GET if path.matched(paths::ID_CREATOR_IDENT) => Ok("GetCreator"),
+ &hyper::Method::GET if path.matched(paths::ID_CREATOR_IDENT) => Some("GetCreator"),
// GetCreatorEdit - GET /creator/edit/{edit_id}
&hyper::Method::GET if path.matched(paths::ID_CREATOR_EDIT_EDIT_ID) => {
- Ok("GetCreatorEdit")
+ Some("GetCreatorEdit")
}
// GetCreatorHistory - GET /creator/{ident}/history
&hyper::Method::GET if path.matched(paths::ID_CREATOR_IDENT_HISTORY) => {
- Ok("GetCreatorHistory")
+ Some("GetCreatorHistory")
}
// GetCreatorRedirects - GET /creator/{ident}/redirects
&hyper::Method::GET if path.matched(paths::ID_CREATOR_IDENT_REDIRECTS) => {
- Ok("GetCreatorRedirects")
+ Some("GetCreatorRedirects")
}
// GetCreatorReleases - GET /creator/{ident}/releases
&hyper::Method::GET if path.matched(paths::ID_CREATOR_IDENT_RELEASES) => {
- Ok("GetCreatorReleases")
+ Some("GetCreatorReleases")
}
// GetCreatorRevision - GET /creator/rev/{rev_id}
&hyper::Method::GET if path.matched(paths::ID_CREATOR_REV_REV_ID) => {
- Ok("GetCreatorRevision")
+ Some("GetCreatorRevision")
}
// GetEditgroup - GET /editgroup/{editgroup_id}
&hyper::Method::GET if path.matched(paths::ID_EDITGROUP_EDITGROUP_ID) => {
- Ok("GetEditgroup")
+ Some("GetEditgroup")
}
// GetEditgroupAnnotations - GET /editgroup/{editgroup_id}/annotations
&hyper::Method::GET if path.matched(paths::ID_EDITGROUP_EDITGROUP_ID_ANNOTATIONS) => {
- Ok("GetEditgroupAnnotations")
+ Some("GetEditgroupAnnotations")
}
// GetEditgroupsReviewable - GET /editgroup/reviewable
&hyper::Method::GET if path.matched(paths::ID_EDITGROUP_REVIEWABLE) => {
- Ok("GetEditgroupsReviewable")
+ Some("GetEditgroupsReviewable")
}
// GetEditor - GET /editor/{editor_id}
- &hyper::Method::GET if path.matched(paths::ID_EDITOR_EDITOR_ID) => Ok("GetEditor"),
+ &hyper::Method::GET if path.matched(paths::ID_EDITOR_EDITOR_ID) => Some("GetEditor"),
// GetEditorAnnotations - GET /editor/{editor_id}/annotations
&hyper::Method::GET if path.matched(paths::ID_EDITOR_EDITOR_ID_ANNOTATIONS) => {
- Ok("GetEditorAnnotations")
+ Some("GetEditorAnnotations")
}
// GetEditorEditgroups - GET /editor/{editor_id}/editgroups
&hyper::Method::GET if path.matched(paths::ID_EDITOR_EDITOR_ID_EDITGROUPS) => {
- Ok("GetEditorEditgroups")
+ Some("GetEditorEditgroups")
}
// GetFile - GET /file/{ident}
- &hyper::Method::GET if path.matched(paths::ID_FILE_IDENT) => Ok("GetFile"),
+ &hyper::Method::GET if path.matched(paths::ID_FILE_IDENT) => Some("GetFile"),
// GetFileEdit - GET /file/edit/{edit_id}
- &hyper::Method::GET if path.matched(paths::ID_FILE_EDIT_EDIT_ID) => Ok("GetFileEdit"),
+ &hyper::Method::GET if path.matched(paths::ID_FILE_EDIT_EDIT_ID) => Some("GetFileEdit"),
// GetFileHistory - GET /file/{ident}/history
&hyper::Method::GET if path.matched(paths::ID_FILE_IDENT_HISTORY) => {
- Ok("GetFileHistory")
+ Some("GetFileHistory")
}
// GetFileRedirects - GET /file/{ident}/redirects
&hyper::Method::GET if path.matched(paths::ID_FILE_IDENT_REDIRECTS) => {
- Ok("GetFileRedirects")
+ Some("GetFileRedirects")
}
// GetFileRevision - GET /file/rev/{rev_id}
- &hyper::Method::GET if path.matched(paths::ID_FILE_REV_REV_ID) => Ok("GetFileRevision"),
+ &hyper::Method::GET if path.matched(paths::ID_FILE_REV_REV_ID) => {
+ Some("GetFileRevision")
+ }
// GetFileset - GET /fileset/{ident}
- &hyper::Method::GET if path.matched(paths::ID_FILESET_IDENT) => Ok("GetFileset"),
+ &hyper::Method::GET if path.matched(paths::ID_FILESET_IDENT) => Some("GetFileset"),
// GetFilesetEdit - GET /fileset/edit/{edit_id}
&hyper::Method::GET if path.matched(paths::ID_FILESET_EDIT_EDIT_ID) => {
- Ok("GetFilesetEdit")
+ Some("GetFilesetEdit")
}
// GetFilesetHistory - GET /fileset/{ident}/history
&hyper::Method::GET if path.matched(paths::ID_FILESET_IDENT_HISTORY) => {
- Ok("GetFilesetHistory")
+ Some("GetFilesetHistory")
}
// GetFilesetRedirects - GET /fileset/{ident}/redirects
&hyper::Method::GET if path.matched(paths::ID_FILESET_IDENT_REDIRECTS) => {
- Ok("GetFilesetRedirects")
+ Some("GetFilesetRedirects")
}
// GetFilesetRevision - GET /fileset/rev/{rev_id}
&hyper::Method::GET if path.matched(paths::ID_FILESET_REV_REV_ID) => {
- Ok("GetFilesetRevision")
+ Some("GetFilesetRevision")
}
// GetRelease - GET /release/{ident}
- &hyper::Method::GET if path.matched(paths::ID_RELEASE_IDENT) => Ok("GetRelease"),
+ &hyper::Method::GET if path.matched(paths::ID_RELEASE_IDENT) => Some("GetRelease"),
// GetReleaseEdit - GET /release/edit/{edit_id}
&hyper::Method::GET if path.matched(paths::ID_RELEASE_EDIT_EDIT_ID) => {
- Ok("GetReleaseEdit")
+ Some("GetReleaseEdit")
}
// GetReleaseFiles - GET /release/{ident}/files
&hyper::Method::GET if path.matched(paths::ID_RELEASE_IDENT_FILES) => {
- Ok("GetReleaseFiles")
+ Some("GetReleaseFiles")
}
// GetReleaseFilesets - GET /release/{ident}/filesets
&hyper::Method::GET if path.matched(paths::ID_RELEASE_IDENT_FILESETS) => {
- Ok("GetReleaseFilesets")
+ Some("GetReleaseFilesets")
}
// GetReleaseHistory - GET /release/{ident}/history
&hyper::Method::GET if path.matched(paths::ID_RELEASE_IDENT_HISTORY) => {
- Ok("GetReleaseHistory")
+ Some("GetReleaseHistory")
}
// GetReleaseRedirects - GET /release/{ident}/redirects
&hyper::Method::GET if path.matched(paths::ID_RELEASE_IDENT_REDIRECTS) => {
- Ok("GetReleaseRedirects")
+ Some("GetReleaseRedirects")
}
// GetReleaseRevision - GET /release/rev/{rev_id}
&hyper::Method::GET if path.matched(paths::ID_RELEASE_REV_REV_ID) => {
- Ok("GetReleaseRevision")
+ Some("GetReleaseRevision")
}
// GetReleaseWebcaptures - GET /release/{ident}/webcaptures
&hyper::Method::GET if path.matched(paths::ID_RELEASE_IDENT_WEBCAPTURES) => {
- Ok("GetReleaseWebcaptures")
+ Some("GetReleaseWebcaptures")
}
// GetWebcapture - GET /webcapture/{ident}
- &hyper::Method::GET if path.matched(paths::ID_WEBCAPTURE_IDENT) => Ok("GetWebcapture"),
+ &hyper::Method::GET if path.matched(paths::ID_WEBCAPTURE_IDENT) => {
+ Some("GetWebcapture")
+ }
// GetWebcaptureEdit - GET /webcapture/edit/{edit_id}
&hyper::Method::GET if path.matched(paths::ID_WEBCAPTURE_EDIT_EDIT_ID) => {
- Ok("GetWebcaptureEdit")
+ Some("GetWebcaptureEdit")
}
// GetWebcaptureHistory - GET /webcapture/{ident}/history
&hyper::Method::GET if path.matched(paths::ID_WEBCAPTURE_IDENT_HISTORY) => {
- Ok("GetWebcaptureHistory")
+ Some("GetWebcaptureHistory")
}
// GetWebcaptureRedirects - GET /webcapture/{ident}/redirects
&hyper::Method::GET if path.matched(paths::ID_WEBCAPTURE_IDENT_REDIRECTS) => {
- Ok("GetWebcaptureRedirects")
+ Some("GetWebcaptureRedirects")
}
// GetWebcaptureRevision - GET /webcapture/rev/{rev_id}
&hyper::Method::GET if path.matched(paths::ID_WEBCAPTURE_REV_REV_ID) => {
- Ok("GetWebcaptureRevision")
+ Some("GetWebcaptureRevision")
}
// GetWork - GET /work/{ident}
- &hyper::Method::GET if path.matched(paths::ID_WORK_IDENT) => Ok("GetWork"),
+ &hyper::Method::GET if path.matched(paths::ID_WORK_IDENT) => Some("GetWork"),
// GetWorkEdit - GET /work/edit/{edit_id}
- &hyper::Method::GET if path.matched(paths::ID_WORK_EDIT_EDIT_ID) => Ok("GetWorkEdit"),
+ &hyper::Method::GET if path.matched(paths::ID_WORK_EDIT_EDIT_ID) => Some("GetWorkEdit"),
// GetWorkHistory - GET /work/{ident}/history
&hyper::Method::GET if path.matched(paths::ID_WORK_IDENT_HISTORY) => {
- Ok("GetWorkHistory")
+ Some("GetWorkHistory")
}
// GetWorkRedirects - GET /work/{ident}/redirects
&hyper::Method::GET if path.matched(paths::ID_WORK_IDENT_REDIRECTS) => {
- Ok("GetWorkRedirects")
+ Some("GetWorkRedirects")
}
// GetWorkReleases - GET /work/{ident}/releases
&hyper::Method::GET if path.matched(paths::ID_WORK_IDENT_RELEASES) => {
- Ok("GetWorkReleases")
+ Some("GetWorkReleases")
}
// GetWorkRevision - GET /work/rev/{rev_id}
- &hyper::Method::GET if path.matched(paths::ID_WORK_REV_REV_ID) => Ok("GetWorkRevision"),
+ &hyper::Method::GET if path.matched(paths::ID_WORK_REV_REV_ID) => {
+ Some("GetWorkRevision")
+ }
// LookupContainer - GET /container/lookup
&hyper::Method::GET if path.matched(paths::ID_CONTAINER_LOOKUP) => {
- Ok("LookupContainer")
+ Some("LookupContainer")
}
// LookupCreator - GET /creator/lookup
- &hyper::Method::GET if path.matched(paths::ID_CREATOR_LOOKUP) => Ok("LookupCreator"),
+ &hyper::Method::GET if path.matched(paths::ID_CREATOR_LOOKUP) => Some("LookupCreator"),
// LookupEditor - GET /editor/lookup
- &hyper::Method::GET if path.matched(paths::ID_EDITOR_LOOKUP) => Ok("LookupEditor"),
+ &hyper::Method::GET if path.matched(paths::ID_EDITOR_LOOKUP) => Some("LookupEditor"),
// LookupFile - GET /file/lookup
- &hyper::Method::GET if path.matched(paths::ID_FILE_LOOKUP) => Ok("LookupFile"),
+ &hyper::Method::GET if path.matched(paths::ID_FILE_LOOKUP) => Some("LookupFile"),
// LookupRelease - GET /release/lookup
- &hyper::Method::GET if path.matched(paths::ID_RELEASE_LOOKUP) => Ok("LookupRelease"),
+ &hyper::Method::GET if path.matched(paths::ID_RELEASE_LOOKUP) => Some("LookupRelease"),
// UpdateContainer - PUT /editgroup/{editgroup_id}/container/{ident}
&hyper::Method::PUT
if path.matched(paths::ID_EDITGROUP_EDITGROUP_ID_CONTAINER_IDENT) =>
{
- Ok("UpdateContainer")
+ Some("UpdateContainer")
}
// UpdateCreator - PUT /editgroup/{editgroup_id}/creator/{ident}
&hyper::Method::PUT if path.matched(paths::ID_EDITGROUP_EDITGROUP_ID_CREATOR_IDENT) => {
- Ok("UpdateCreator")
+ Some("UpdateCreator")
}
// UpdateEditgroup - PUT /editgroup/{editgroup_id}
&hyper::Method::PUT if path.matched(paths::ID_EDITGROUP_EDITGROUP_ID) => {
- Ok("UpdateEditgroup")
+ Some("UpdateEditgroup")
}
// UpdateEditor - PUT /editor/{editor_id}
- &hyper::Method::PUT if path.matched(paths::ID_EDITOR_EDITOR_ID) => Ok("UpdateEditor"),
+ &hyper::Method::PUT if path.matched(paths::ID_EDITOR_EDITOR_ID) => Some("UpdateEditor"),
// UpdateFile - PUT /editgroup/{editgroup_id}/file/{ident}
&hyper::Method::PUT if path.matched(paths::ID_EDITGROUP_EDITGROUP_ID_FILE_IDENT) => {
- Ok("UpdateFile")
+ Some("UpdateFile")
}
// UpdateFileset - PUT /editgroup/{editgroup_id}/fileset/{ident}
&hyper::Method::PUT if path.matched(paths::ID_EDITGROUP_EDITGROUP_ID_FILESET_IDENT) => {
- Ok("UpdateFileset")
+ Some("UpdateFileset")
}
// UpdateRelease - PUT /editgroup/{editgroup_id}/release/{ident}
&hyper::Method::PUT if path.matched(paths::ID_EDITGROUP_EDITGROUP_ID_RELEASE_IDENT) => {
- Ok("UpdateRelease")
+ Some("UpdateRelease")
}
// UpdateWebcapture - PUT /editgroup/{editgroup_id}/webcapture/{ident}
&hyper::Method::PUT
if path.matched(paths::ID_EDITGROUP_EDITGROUP_ID_WEBCAPTURE_IDENT) =>
{
- Ok("UpdateWebcapture")
+ Some("UpdateWebcapture")
}
// UpdateWork - PUT /editgroup/{editgroup_id}/work/{ident}
&hyper::Method::PUT if path.matched(paths::ID_EDITGROUP_EDITGROUP_ID_WORK_IDENT) => {
- Ok("UpdateWork")
+ Some("UpdateWork")
}
- _ => Err(()),
+ _ => None,
}
}
}