aboutsummaryrefslogtreecommitdiffstats
path: root/fatcat-openapi/src/client
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 /fatcat-openapi/src/client
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)
Diffstat (limited to 'fatcat-openapi/src/client')
-rw-r--r--fatcat-openapi/src/client/mod.rs3043
1 files changed, 2001 insertions, 1042 deletions
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,