From c0ad5f80c13fc66240a17e59dfff559c6967aac7 Mon Sep 17 00:00:00 2001 From: Bryan Newbold Date: Wed, 18 Sep 2019 20:05:39 -0700 Subject: rust codegen (with rustfix, compiles 2018 edition) --- rust/fatcat-openapi/src/client.rs | 213 ++++++++++++++++++++------------------ 1 file changed, 112 insertions(+), 101 deletions(-) (limited to 'rust/fatcat-openapi/src/client.rs') diff --git a/rust/fatcat-openapi/src/client.rs b/rust/fatcat-openapi/src/client.rs index 461b426c..e1e8130e 100644 --- a/rust/fatcat-openapi/src/client.rs +++ b/rust/fatcat-openapi/src/client.rs @@ -22,7 +22,7 @@ use std::path::Path; use std::str; use std::sync::Arc; -use mimetypes; +use crate::mimetypes; use serde_json; @@ -33,8 +33,8 @@ use swagger; use swagger::{ApiError, Context, XSpanId}; -use models; -use { +use crate::models; +use crate::{ AcceptEditgroupResponse, Api, AuthCheckResponse, AuthOidcResponse, CreateAuthTokenResponse, CreateContainerAutoBatchResponse, CreateContainerResponse, CreateCreatorAutoBatchResponse, CreateCreatorResponse, CreateEditgroupAnnotationResponse, CreateEditgroupResponse, CreateFileAutoBatchResponse, CreateFileResponse, CreateFilesetAutoBatchResponse, CreateFilesetResponse, CreateReleaseAutoBatchResponse, CreateReleaseResponse, CreateWebcaptureAutoBatchResponse, CreateWebcaptureResponse, CreateWorkAutoBatchResponse, CreateWorkResponse, DeleteContainerEditResponse, @@ -73,7 +73,7 @@ fn into_base_path(input: T, correct_scheme: Option<&'static str>) -> #[derive(Clone)] pub struct Client { base_path: String, - hyper_client: Arc hyper::client::Client + Sync + Send>, + hyper_client: Arc hyper::client::Client + Sync + Send>, } impl fmt::Debug for Client { @@ -161,7 +161,7 @@ impl Client { /// The reason for this function's existence is to support legacy test code, which did mocking at the hyper layer. /// This is not a recommended way to write new tests. If other reasons are found for using this function, they /// should be mentioned here. - pub fn try_new_with_hyper_client(base_path: T, hyper_client: Arc hyper::client::Client + Sync + Send>) -> Result + pub fn try_new_with_hyper_client(base_path: T, hyper_client: Arc hyper::client::Client + Sync + Send>) -> Result where T: IntoUrl, { @@ -173,7 +173,7 @@ impl Client { } impl Api for Client { - fn auth_check(&self, param_role: Option, context: &Context) -> Box + Send> { + fn auth_check(&self, param_role: Option, context: &Context) -> Box + Send> { // Query parameters let query_role = param_role.map_or_else(String::new, |query| format!("role={role}&", role = query.to_string())); @@ -251,7 +251,7 @@ impl Api for Client { Box::new(futures::done(result)) } - fn auth_oidc(&self, param_oidc_params: models::AuthOidc, context: &Context) -> Box + Send> { + fn auth_oidc(&self, param_oidc_params: models::AuthOidc, context: &Context) -> Box + Send> { let url = format!("{}/v0/auth/oidc", self.base_path); let body = serde_json::to_string(¶m_oidc_params).expect("impossible to fail to serialize"); @@ -345,7 +345,7 @@ impl Api for Client { Box::new(futures::done(result)) } - fn create_auth_token(&self, param_editor_id: String, param_duration_seconds: Option, context: &Context) -> Box + Send> { + fn create_auth_token(&self, param_editor_id: String, param_duration_seconds: Option, context: &Context) -> Box + Send> { // Query parameters let query_duration_seconds = param_duration_seconds.map_or_else(String::new, |query| format!("duration_seconds={duration_seconds}&", duration_seconds = query.to_string())); @@ -428,7 +428,7 @@ impl Api for Client { Box::new(futures::done(result)) } - fn get_changelog(&self, param_limit: Option, context: &Context) -> Box + Send> { + fn get_changelog(&self, param_limit: Option, context: &Context) -> Box + Send> { // Query parameters let query_limit = param_limit.map_or_else(String::new, |query| format!("limit={limit}&", limit = query.to_string())); @@ -484,7 +484,7 @@ impl Api for Client { Box::new(futures::done(result)) } - fn get_changelog_entry(&self, param_index: i64, context: &Context) -> Box + Send> { + fn get_changelog_entry(&self, param_index: i64, context: &Context) -> Box + Send> { let url = format!( "{}/v0/changelog/{index}", self.base_path, @@ -548,7 +548,7 @@ impl Api for Client { Box::new(futures::done(result)) } - fn create_container(&self, param_editgroup_id: String, param_entity: models::ContainerEntity, context: &Context) -> Box + Send> { + fn create_container(&self, param_editgroup_id: String, param_entity: models::ContainerEntity, context: &Context) -> Box + Send> { let url = format!( "{}/v0/editgroup/{editgroup_id}/container", self.base_path, @@ -639,7 +639,7 @@ impl Api for Client { Box::new(futures::done(result)) } - fn create_container_auto_batch(&self, param_auto_batch: models::ContainerAutoBatch, context: &Context) -> Box + Send> { + fn create_container_auto_batch(&self, param_auto_batch: models::ContainerAutoBatch, context: &Context) -> Box + Send> { let url = format!("{}/v0/editgroup/auto/container/batch", self.base_path); let body = serde_json::to_string(¶m_auto_batch).expect("impossible to fail to serialize"); @@ -726,7 +726,7 @@ impl Api for Client { Box::new(futures::done(result)) } - fn delete_container(&self, param_editgroup_id: String, param_ident: String, context: &Context) -> Box + Send> { + fn delete_container(&self, param_editgroup_id: String, param_ident: String, context: &Context) -> Box + Send> { let url = format!( "{}/v0/editgroup/{editgroup_id}/container/{ident}", self.base_path, @@ -813,7 +813,7 @@ impl Api for Client { Box::new(futures::done(result)) } - fn delete_container_edit(&self, param_editgroup_id: String, param_edit_id: String, context: &Context) -> Box + Send> { + fn delete_container_edit(&self, param_editgroup_id: String, param_edit_id: String, context: &Context) -> Box + Send> { let url = format!( "{}/v0/editgroup/{editgroup_id}/container/edit/{edit_id}", self.base_path, @@ -900,7 +900,7 @@ impl Api for Client { Box::new(futures::done(result)) } - fn get_container(&self, param_ident: String, param_expand: Option, param_hide: Option, context: &Context) -> Box + Send> { + fn get_container(&self, param_ident: String, param_expand: Option, param_hide: Option, context: &Context) -> Box + Send> { // Query parameters let query_expand = param_expand.map_or_else(String::new, |query| format!("expand={expand}&", expand = query.to_string())); let query_hide = param_hide.map_or_else(String::new, |query| format!("hide={hide}&", hide = query.to_string())); @@ -970,7 +970,7 @@ impl Api for Client { Box::new(futures::done(result)) } - fn get_container_edit(&self, param_edit_id: String, context: &Context) -> Box + Send> { + fn get_container_edit(&self, param_edit_id: String, context: &Context) -> Box + Send> { let url = format!( "{}/v0/container/edit/{edit_id}", self.base_path, @@ -1034,7 +1034,7 @@ impl Api for Client { Box::new(futures::done(result)) } - fn get_container_history(&self, param_ident: String, param_limit: Option, context: &Context) -> Box + Send> { + fn get_container_history(&self, param_ident: String, param_limit: Option, context: &Context) -> Box + Send> { // Query parameters let query_limit = param_limit.map_or_else(String::new, |query| format!("limit={limit}&", limit = query.to_string())); @@ -1102,7 +1102,7 @@ impl Api for Client { Box::new(futures::done(result)) } - fn get_container_redirects(&self, param_ident: String, context: &Context) -> Box + Send> { + fn get_container_redirects(&self, param_ident: String, context: &Context) -> Box + Send> { let url = format!( "{}/v0/container/{ident}/redirects", self.base_path, @@ -1172,7 +1172,7 @@ impl Api for Client { param_expand: Option, param_hide: Option, context: &Context, - ) -> Box + Send> { + ) -> Box + Send> { // Query parameters let query_expand = param_expand.map_or_else(String::new, |query| format!("expand={expand}&", expand = query.to_string())); let query_hide = param_hide.map_or_else(String::new, |query| format!("hide={hide}&", hide = query.to_string())); @@ -1249,7 +1249,7 @@ impl Api for Client { param_expand: Option, param_hide: Option, context: &Context, - ) -> Box + Send> { + ) -> Box + Send> { // Query parameters let query_issnl = param_issnl.map_or_else(String::new, |query| format!("issnl={issnl}&", issnl = query.to_string())); let query_wikidata_qid = param_wikidata_qid.map_or_else(String::new, |query| format!("wikidata_qid={wikidata_qid}&", wikidata_qid = query.to_string())); @@ -1328,7 +1328,7 @@ impl Api for Client { param_ident: String, param_entity: models::ContainerEntity, context: &Context, - ) -> Box + Send> { + ) -> Box + Send> { let url = format!( "{}/v0/editgroup/{editgroup_id}/container/{ident}", self.base_path, @@ -1420,7 +1420,7 @@ impl Api for Client { Box::new(futures::done(result)) } - fn create_creator(&self, param_editgroup_id: String, param_entity: models::CreatorEntity, context: &Context) -> Box + Send> { + fn create_creator(&self, param_editgroup_id: String, param_entity: models::CreatorEntity, context: &Context) -> Box + Send> { let url = format!( "{}/v0/editgroup/{editgroup_id}/creator", self.base_path, @@ -1511,7 +1511,7 @@ impl Api for Client { Box::new(futures::done(result)) } - fn create_creator_auto_batch(&self, param_auto_batch: models::CreatorAutoBatch, context: &Context) -> Box + Send> { + fn create_creator_auto_batch(&self, param_auto_batch: models::CreatorAutoBatch, context: &Context) -> Box + Send> { let url = format!("{}/v0/editgroup/auto/creator/batch", self.base_path); let body = serde_json::to_string(¶m_auto_batch).expect("impossible to fail to serialize"); @@ -1598,7 +1598,7 @@ impl Api for Client { Box::new(futures::done(result)) } - fn delete_creator(&self, param_editgroup_id: String, param_ident: String, context: &Context) -> Box + Send> { + fn delete_creator(&self, param_editgroup_id: String, param_ident: String, context: &Context) -> Box + Send> { let url = format!( "{}/v0/editgroup/{editgroup_id}/creator/{ident}", self.base_path, @@ -1685,7 +1685,7 @@ impl Api for Client { Box::new(futures::done(result)) } - fn delete_creator_edit(&self, param_editgroup_id: String, param_edit_id: String, context: &Context) -> Box + Send> { + fn delete_creator_edit(&self, param_editgroup_id: String, param_edit_id: String, context: &Context) -> Box + Send> { let url = format!( "{}/v0/editgroup/{editgroup_id}/creator/edit/{edit_id}", self.base_path, @@ -1772,7 +1772,7 @@ impl Api for Client { Box::new(futures::done(result)) } - fn get_creator(&self, param_ident: String, param_expand: Option, param_hide: Option, context: &Context) -> Box + Send> { + fn get_creator(&self, param_ident: String, param_expand: Option, param_hide: Option, context: &Context) -> Box + Send> { // Query parameters let query_expand = param_expand.map_or_else(String::new, |query| format!("expand={expand}&", expand = query.to_string())); let query_hide = param_hide.map_or_else(String::new, |query| format!("hide={hide}&", hide = query.to_string())); @@ -1842,7 +1842,7 @@ impl Api for Client { Box::new(futures::done(result)) } - fn get_creator_edit(&self, param_edit_id: String, context: &Context) -> Box + Send> { + fn get_creator_edit(&self, param_edit_id: String, context: &Context) -> Box + Send> { let url = format!( "{}/v0/creator/edit/{edit_id}", self.base_path, @@ -1906,7 +1906,7 @@ impl Api for Client { Box::new(futures::done(result)) } - fn get_creator_history(&self, param_ident: String, param_limit: Option, context: &Context) -> Box + Send> { + fn get_creator_history(&self, param_ident: String, param_limit: Option, context: &Context) -> Box + Send> { // Query parameters let query_limit = param_limit.map_or_else(String::new, |query| format!("limit={limit}&", limit = query.to_string())); @@ -1974,7 +1974,7 @@ impl Api for Client { Box::new(futures::done(result)) } - fn get_creator_redirects(&self, param_ident: String, context: &Context) -> Box + Send> { + fn get_creator_redirects(&self, param_ident: String, context: &Context) -> Box + Send> { let url = format!( "{}/v0/creator/{ident}/redirects", self.base_path, @@ -2038,7 +2038,7 @@ impl Api for Client { Box::new(futures::done(result)) } - fn get_creator_releases(&self, param_ident: String, param_hide: Option, context: &Context) -> Box + Send> { + fn get_creator_releases(&self, param_ident: String, param_hide: Option, context: &Context) -> Box + Send> { // Query parameters let query_hide = param_hide.map_or_else(String::new, |query| format!("hide={hide}&", hide = query.to_string())); @@ -2112,7 +2112,7 @@ impl Api for Client { param_expand: Option, param_hide: Option, context: &Context, - ) -> Box + Send> { + ) -> Box + Send> { // Query parameters let query_expand = param_expand.map_or_else(String::new, |query| format!("expand={expand}&", expand = query.to_string())); let query_hide = param_hide.map_or_else(String::new, |query| format!("hide={hide}&", hide = query.to_string())); @@ -2189,7 +2189,7 @@ impl Api for Client { param_expand: Option, param_hide: Option, context: &Context, - ) -> Box + Send> { + ) -> Box + Send> { // Query parameters let query_orcid = param_orcid.map_or_else(String::new, |query| format!("orcid={orcid}&", orcid = query.to_string())); let query_wikidata_qid = param_wikidata_qid.map_or_else(String::new, |query| format!("wikidata_qid={wikidata_qid}&", wikidata_qid = query.to_string())); @@ -2268,7 +2268,7 @@ impl Api for Client { param_ident: String, param_entity: models::CreatorEntity, context: &Context, - ) -> Box + Send> { + ) -> Box + Send> { let url = format!( "{}/v0/editgroup/{editgroup_id}/creator/{ident}", self.base_path, @@ -2360,7 +2360,7 @@ impl Api for Client { Box::new(futures::done(result)) } - fn accept_editgroup(&self, param_editgroup_id: String, context: &Context) -> Box + Send> { + fn accept_editgroup(&self, param_editgroup_id: String, context: &Context) -> Box + Send> { let url = format!( "{}/v0/editgroup/{editgroup_id}/accept", self.base_path, @@ -2453,7 +2453,7 @@ impl Api for Client { Box::new(futures::done(result)) } - fn create_editgroup(&self, param_editgroup: models::Editgroup, context: &Context) -> Box + Send> { + fn create_editgroup(&self, param_editgroup: models::Editgroup, context: &Context) -> Box + Send> { let url = format!("{}/v0/editgroup", self.base_path); let body = serde_json::to_string(¶m_editgroup).expect("impossible to fail to serialize"); @@ -2545,7 +2545,7 @@ impl Api for Client { param_editgroup_id: String, param_annotation: models::EditgroupAnnotation, context: &Context, - ) -> Box + Send> { + ) -> Box + Send> { let url = format!( "{}/v0/editgroup/{editgroup_id}/annotation", self.base_path, @@ -2636,7 +2636,7 @@ impl Api for Client { Box::new(futures::done(result)) } - fn get_editgroup(&self, param_editgroup_id: String, context: &Context) -> Box + Send> { + fn get_editgroup(&self, param_editgroup_id: String, context: &Context) -> Box + Send> { let url = format!( "{}/v0/editgroup/{editgroup_id}", self.base_path, @@ -2700,7 +2700,12 @@ impl Api for Client { Box::new(futures::done(result)) } - fn get_editgroup_annotations(&self, param_editgroup_id: String, param_expand: Option, context: &Context) -> Box + Send> { + fn get_editgroup_annotations( + &self, + param_editgroup_id: String, + param_expand: Option, + context: &Context, + ) -> Box + Send> { // Query parameters let query_expand = param_expand.map_or_else(String::new, |query| format!("expand={expand}&", expand = query.to_string())); @@ -2797,7 +2802,7 @@ impl Api for Client { param_before: Option>, param_since: Option>, context: &Context, - ) -> Box + Send> { + ) -> Box + Send> { // Query parameters let query_expand = param_expand.map_or_else(String::new, |query| format!("expand={expand}&", expand = query.to_string())); let query_limit = param_limit.map_or_else(String::new, |query| format!("limit={limit}&", limit = query.to_string())); @@ -2876,7 +2881,7 @@ impl Api for Client { param_editgroup: models::Editgroup, param_submit: Option, context: &Context, - ) -> Box + Send> { + ) -> Box + Send> { // Query parameters let query_submit = param_submit.map_or_else(String::new, |query| format!("submit={submit}&", submit = query.to_string())); @@ -2971,7 +2976,7 @@ impl Api for Client { Box::new(futures::done(result)) } - fn get_editor(&self, param_editor_id: String, context: &Context) -> Box + Send> { + fn get_editor(&self, param_editor_id: String, context: &Context) -> Box + Send> { let url = format!( "{}/v0/editor/{editor_id}", self.base_path, @@ -3042,7 +3047,7 @@ impl Api for Client { param_before: Option>, param_since: Option>, context: &Context, - ) -> Box + Send> { + ) -> Box + Send> { // Query parameters let query_limit = param_limit.map_or_else(String::new, |query| format!("limit={limit}&", limit = query.to_string())); let query_before = param_before.map_or_else(String::new, |query| format!("before={before}&", before = query.to_string())); @@ -3143,7 +3148,7 @@ impl Api for Client { param_before: Option>, param_since: Option>, context: &Context, - ) -> Box + Send> { + ) -> Box + Send> { // Query parameters let query_limit = param_limit.map_or_else(String::new, |query| format!("limit={limit}&", limit = query.to_string())); let query_before = param_before.map_or_else(String::new, |query| format!("before={before}&", before = query.to_string())); @@ -3215,7 +3220,7 @@ impl Api for Client { Box::new(futures::done(result)) } - fn update_editor(&self, param_editor_id: String, param_editor: models::Editor, context: &Context) -> Box + Send> { + fn update_editor(&self, param_editor_id: String, param_editor: models::Editor, context: &Context) -> Box + Send> { let url = format!( "{}/v0/editor/{editor_id}", self.base_path, @@ -3306,7 +3311,7 @@ impl Api for Client { Box::new(futures::done(result)) } - fn create_file(&self, param_editgroup_id: String, param_entity: models::FileEntity, context: &Context) -> Box + Send> { + fn create_file(&self, param_editgroup_id: String, param_entity: models::FileEntity, context: &Context) -> Box + Send> { let url = format!( "{}/v0/editgroup/{editgroup_id}/file", self.base_path, @@ -3397,7 +3402,7 @@ impl Api for Client { Box::new(futures::done(result)) } - fn create_file_auto_batch(&self, param_auto_batch: models::FileAutoBatch, context: &Context) -> Box + Send> { + fn create_file_auto_batch(&self, param_auto_batch: models::FileAutoBatch, context: &Context) -> Box + Send> { let url = format!("{}/v0/editgroup/auto/file/batch", self.base_path); let body = serde_json::to_string(¶m_auto_batch).expect("impossible to fail to serialize"); @@ -3484,7 +3489,7 @@ impl Api for Client { Box::new(futures::done(result)) } - fn delete_file(&self, param_editgroup_id: String, param_ident: String, context: &Context) -> Box + Send> { + fn delete_file(&self, param_editgroup_id: String, param_ident: String, context: &Context) -> Box + Send> { let url = format!( "{}/v0/editgroup/{editgroup_id}/file/{ident}", self.base_path, @@ -3571,7 +3576,7 @@ impl Api for Client { Box::new(futures::done(result)) } - fn delete_file_edit(&self, param_editgroup_id: String, param_edit_id: String, context: &Context) -> Box + Send> { + fn delete_file_edit(&self, param_editgroup_id: String, param_edit_id: String, context: &Context) -> Box + Send> { let url = format!( "{}/v0/editgroup/{editgroup_id}/file/edit/{edit_id}", self.base_path, @@ -3658,7 +3663,7 @@ impl Api for Client { Box::new(futures::done(result)) } - fn get_file(&self, param_ident: String, param_expand: Option, param_hide: Option, context: &Context) -> Box + Send> { + fn get_file(&self, param_ident: String, param_expand: Option, param_hide: Option, context: &Context) -> Box + Send> { // Query parameters let query_expand = param_expand.map_or_else(String::new, |query| format!("expand={expand}&", expand = query.to_string())); let query_hide = param_hide.map_or_else(String::new, |query| format!("hide={hide}&", hide = query.to_string())); @@ -3728,7 +3733,7 @@ impl Api for Client { Box::new(futures::done(result)) } - fn get_file_edit(&self, param_edit_id: String, context: &Context) -> Box + Send> { + fn get_file_edit(&self, param_edit_id: String, context: &Context) -> Box + Send> { let url = format!( "{}/v0/file/edit/{edit_id}", self.base_path, @@ -3792,7 +3797,7 @@ impl Api for Client { Box::new(futures::done(result)) } - fn get_file_history(&self, param_ident: String, param_limit: Option, context: &Context) -> Box + Send> { + fn get_file_history(&self, param_ident: String, param_limit: Option, context: &Context) -> Box + Send> { // Query parameters let query_limit = param_limit.map_or_else(String::new, |query| format!("limit={limit}&", limit = query.to_string())); @@ -3860,7 +3865,7 @@ impl Api for Client { Box::new(futures::done(result)) } - fn get_file_redirects(&self, param_ident: String, context: &Context) -> Box + Send> { + fn get_file_redirects(&self, param_ident: String, context: &Context) -> Box + Send> { let url = format!( "{}/v0/file/{ident}/redirects", self.base_path, @@ -3930,7 +3935,7 @@ impl Api for Client { param_expand: Option, param_hide: Option, context: &Context, - ) -> Box + Send> { + ) -> Box + Send> { // Query parameters let query_expand = param_expand.map_or_else(String::new, |query| format!("expand={expand}&", expand = query.to_string())); let query_hide = param_hide.map_or_else(String::new, |query| format!("hide={hide}&", hide = query.to_string())); @@ -4008,7 +4013,7 @@ impl Api for Client { param_expand: Option, param_hide: Option, context: &Context, - ) -> Box + Send> { + ) -> Box + Send> { // Query parameters let query_md5 = param_md5.map_or_else(String::new, |query| format!("md5={md5}&", md5 = query.to_string())); let query_sha1 = param_sha1.map_or_else(String::new, |query| format!("sha1={sha1}&", sha1 = query.to_string())); @@ -4083,7 +4088,7 @@ impl Api for Client { Box::new(futures::done(result)) } - fn update_file(&self, param_editgroup_id: String, param_ident: String, param_entity: models::FileEntity, context: &Context) -> Box + Send> { + fn update_file(&self, param_editgroup_id: String, param_ident: String, param_entity: models::FileEntity, context: &Context) -> Box + Send> { let url = format!( "{}/v0/editgroup/{editgroup_id}/file/{ident}", self.base_path, @@ -4175,7 +4180,7 @@ impl Api for Client { Box::new(futures::done(result)) } - fn create_fileset(&self, param_editgroup_id: String, param_entity: models::FilesetEntity, context: &Context) -> Box + Send> { + fn create_fileset(&self, param_editgroup_id: String, param_entity: models::FilesetEntity, context: &Context) -> Box + Send> { let url = format!( "{}/v0/editgroup/{editgroup_id}/fileset", self.base_path, @@ -4266,7 +4271,7 @@ impl Api for Client { Box::new(futures::done(result)) } - fn create_fileset_auto_batch(&self, param_auto_batch: models::FilesetAutoBatch, context: &Context) -> Box + Send> { + fn create_fileset_auto_batch(&self, param_auto_batch: models::FilesetAutoBatch, context: &Context) -> Box + Send> { let url = format!("{}/v0/editgroup/auto/fileset/batch", self.base_path); let body = serde_json::to_string(¶m_auto_batch).expect("impossible to fail to serialize"); @@ -4353,7 +4358,7 @@ impl Api for Client { Box::new(futures::done(result)) } - fn delete_fileset(&self, param_editgroup_id: String, param_ident: String, context: &Context) -> Box + Send> { + fn delete_fileset(&self, param_editgroup_id: String, param_ident: String, context: &Context) -> Box + Send> { let url = format!( "{}/v0/editgroup/{editgroup_id}/fileset/{ident}", self.base_path, @@ -4440,7 +4445,7 @@ impl Api for Client { Box::new(futures::done(result)) } - fn delete_fileset_edit(&self, param_editgroup_id: String, param_edit_id: String, context: &Context) -> Box + Send> { + fn delete_fileset_edit(&self, param_editgroup_id: String, param_edit_id: String, context: &Context) -> Box + Send> { let url = format!( "{}/v0/editgroup/{editgroup_id}/fileset/edit/{edit_id}", self.base_path, @@ -4527,7 +4532,7 @@ impl Api for Client { Box::new(futures::done(result)) } - fn get_fileset(&self, param_ident: String, param_expand: Option, param_hide: Option, context: &Context) -> Box + Send> { + fn get_fileset(&self, param_ident: String, param_expand: Option, param_hide: Option, context: &Context) -> Box + Send> { // Query parameters let query_expand = param_expand.map_or_else(String::new, |query| format!("expand={expand}&", expand = query.to_string())); let query_hide = param_hide.map_or_else(String::new, |query| format!("hide={hide}&", hide = query.to_string())); @@ -4597,7 +4602,7 @@ impl Api for Client { Box::new(futures::done(result)) } - fn get_fileset_edit(&self, param_edit_id: String, context: &Context) -> Box + Send> { + fn get_fileset_edit(&self, param_edit_id: String, context: &Context) -> Box + Send> { let url = format!( "{}/v0/fileset/edit/{edit_id}", self.base_path, @@ -4661,7 +4666,7 @@ impl Api for Client { Box::new(futures::done(result)) } - fn get_fileset_history(&self, param_ident: String, param_limit: Option, context: &Context) -> Box + Send> { + fn get_fileset_history(&self, param_ident: String, param_limit: Option, context: &Context) -> Box + Send> { // Query parameters let query_limit = param_limit.map_or_else(String::new, |query| format!("limit={limit}&", limit = query.to_string())); @@ -4729,7 +4734,7 @@ impl Api for Client { Box::new(futures::done(result)) } - fn get_fileset_redirects(&self, param_ident: String, context: &Context) -> Box + Send> { + fn get_fileset_redirects(&self, param_ident: String, context: &Context) -> Box + Send> { let url = format!( "{}/v0/fileset/{ident}/redirects", self.base_path, @@ -4799,7 +4804,7 @@ impl Api for Client { param_expand: Option, param_hide: Option, context: &Context, - ) -> Box + Send> { + ) -> Box + Send> { // Query parameters let query_expand = param_expand.map_or_else(String::new, |query| format!("expand={expand}&", expand = query.to_string())); let query_hide = param_hide.map_or_else(String::new, |query| format!("hide={hide}&", hide = query.to_string())); @@ -4875,7 +4880,7 @@ impl Api for Client { param_ident: String, param_entity: models::FilesetEntity, context: &Context, - ) -> Box + Send> { + ) -> Box + Send> { let url = format!( "{}/v0/editgroup/{editgroup_id}/fileset/{ident}", self.base_path, @@ -4967,7 +4972,7 @@ impl Api for Client { Box::new(futures::done(result)) } - fn create_release(&self, param_editgroup_id: String, param_entity: models::ReleaseEntity, context: &Context) -> Box + Send> { + fn create_release(&self, param_editgroup_id: String, param_entity: models::ReleaseEntity, context: &Context) -> Box + Send> { let url = format!( "{}/v0/editgroup/{editgroup_id}/release", self.base_path, @@ -5058,7 +5063,7 @@ impl Api for Client { Box::new(futures::done(result)) } - fn create_release_auto_batch(&self, param_auto_batch: models::ReleaseAutoBatch, context: &Context) -> Box + Send> { + fn create_release_auto_batch(&self, param_auto_batch: models::ReleaseAutoBatch, context: &Context) -> Box + Send> { let url = format!("{}/v0/editgroup/auto/release/batch", self.base_path); let body = serde_json::to_string(¶m_auto_batch).expect("impossible to fail to serialize"); @@ -5145,7 +5150,7 @@ impl Api for Client { Box::new(futures::done(result)) } - fn delete_release(&self, param_editgroup_id: String, param_ident: String, context: &Context) -> Box + Send> { + fn delete_release(&self, param_editgroup_id: String, param_ident: String, context: &Context) -> Box + Send> { let url = format!( "{}/v0/editgroup/{editgroup_id}/release/{ident}", self.base_path, @@ -5232,7 +5237,7 @@ impl Api for Client { Box::new(futures::done(result)) } - fn delete_release_edit(&self, param_editgroup_id: String, param_edit_id: String, context: &Context) -> Box + Send> { + fn delete_release_edit(&self, param_editgroup_id: String, param_edit_id: String, context: &Context) -> Box + Send> { let url = format!( "{}/v0/editgroup/{editgroup_id}/release/edit/{edit_id}", self.base_path, @@ -5319,7 +5324,7 @@ impl Api for Client { Box::new(futures::done(result)) } - fn get_release(&self, param_ident: String, param_expand: Option, param_hide: Option, context: &Context) -> Box + Send> { + fn get_release(&self, param_ident: String, param_expand: Option, param_hide: Option, context: &Context) -> Box + Send> { // Query parameters let query_expand = param_expand.map_or_else(String::new, |query| format!("expand={expand}&", expand = query.to_string())); let query_hide = param_hide.map_or_else(String::new, |query| format!("hide={hide}&", hide = query.to_string())); @@ -5389,7 +5394,7 @@ impl Api for Client { Box::new(futures::done(result)) } - fn get_release_edit(&self, param_edit_id: String, context: &Context) -> Box + Send> { + fn get_release_edit(&self, param_edit_id: String, context: &Context) -> Box + Send> { let url = format!( "{}/v0/release/edit/{edit_id}", self.base_path, @@ -5453,7 +5458,7 @@ impl Api for Client { Box::new(futures::done(result)) } - fn get_release_files(&self, param_ident: String, param_hide: Option, context: &Context) -> Box + Send> { + fn get_release_files(&self, param_ident: String, param_hide: Option, context: &Context) -> Box + Send> { // Query parameters let query_hide = param_hide.map_or_else(String::new, |query| format!("hide={hide}&", hide = query.to_string())); @@ -5521,7 +5526,7 @@ impl Api for Client { Box::new(futures::done(result)) } - fn get_release_filesets(&self, param_ident: String, param_hide: Option, context: &Context) -> Box + Send> { + fn get_release_filesets(&self, param_ident: String, param_hide: Option, context: &Context) -> Box + Send> { // Query parameters let query_hide = param_hide.map_or_else(String::new, |query| format!("hide={hide}&", hide = query.to_string())); @@ -5589,7 +5594,7 @@ impl Api for Client { Box::new(futures::done(result)) } - fn get_release_history(&self, param_ident: String, param_limit: Option, context: &Context) -> Box + Send> { + fn get_release_history(&self, param_ident: String, param_limit: Option, context: &Context) -> Box + Send> { // Query parameters let query_limit = param_limit.map_or_else(String::new, |query| format!("limit={limit}&", limit = query.to_string())); @@ -5657,7 +5662,7 @@ impl Api for Client { Box::new(futures::done(result)) } - fn get_release_redirects(&self, param_ident: String, context: &Context) -> Box + Send> { + fn get_release_redirects(&self, param_ident: String, context: &Context) -> Box + Send> { let url = format!( "{}/v0/release/{ident}/redirects", self.base_path, @@ -5727,7 +5732,7 @@ impl Api for Client { param_expand: Option, param_hide: Option, context: &Context, - ) -> Box + Send> { + ) -> Box + Send> { // Query parameters let query_expand = param_expand.map_or_else(String::new, |query| format!("expand={expand}&", expand = query.to_string())); let query_hide = param_hide.map_or_else(String::new, |query| format!("hide={hide}&", hide = query.to_string())); @@ -5797,7 +5802,7 @@ impl Api for Client { Box::new(futures::done(result)) } - fn get_release_webcaptures(&self, param_ident: String, param_hide: Option, context: &Context) -> Box + Send> { + fn get_release_webcaptures(&self, param_ident: String, param_hide: Option, context: &Context) -> Box + Send> { // Query parameters let query_hide = param_hide.map_or_else(String::new, |query| format!("hide={hide}&", hide = query.to_string())); @@ -5880,7 +5885,7 @@ impl Api for Client { param_expand: Option, param_hide: Option, context: &Context, - ) -> Box + Send> { + ) -> Box + Send> { // Query parameters let query_doi = param_doi.map_or_else(String::new, |query| format!("doi={doi}&", doi = query.to_string())); let query_wikidata_qid = param_wikidata_qid.map_or_else(String::new, |query| format!("wikidata_qid={wikidata_qid}&", wikidata_qid = query.to_string())); @@ -5975,7 +5980,7 @@ impl Api for Client { param_ident: String, param_entity: models::ReleaseEntity, context: &Context, - ) -> Box + Send> { + ) -> Box + Send> { let url = format!( "{}/v0/editgroup/{editgroup_id}/release/{ident}", self.base_path, @@ -6067,7 +6072,7 @@ impl Api for Client { Box::new(futures::done(result)) } - fn create_webcapture(&self, param_editgroup_id: String, param_entity: models::WebcaptureEntity, context: &Context) -> Box + Send> { + fn create_webcapture(&self, param_editgroup_id: String, param_entity: models::WebcaptureEntity, context: &Context) -> Box + Send> { let url = format!( "{}/v0/editgroup/{editgroup_id}/webcapture", self.base_path, @@ -6158,7 +6163,7 @@ impl Api for Client { Box::new(futures::done(result)) } - fn create_webcapture_auto_batch(&self, param_auto_batch: models::WebcaptureAutoBatch, context: &Context) -> Box + Send> { + fn create_webcapture_auto_batch(&self, param_auto_batch: models::WebcaptureAutoBatch, context: &Context) -> Box + Send> { let url = format!("{}/v0/editgroup/auto/webcapture/batch", self.base_path); let body = serde_json::to_string(¶m_auto_batch).expect("impossible to fail to serialize"); @@ -6245,7 +6250,7 @@ impl Api for Client { Box::new(futures::done(result)) } - fn delete_webcapture(&self, param_editgroup_id: String, param_ident: String, context: &Context) -> Box + Send> { + fn delete_webcapture(&self, param_editgroup_id: String, param_ident: String, context: &Context) -> Box + Send> { let url = format!( "{}/v0/editgroup/{editgroup_id}/webcapture/{ident}", self.base_path, @@ -6332,7 +6337,7 @@ impl Api for Client { Box::new(futures::done(result)) } - fn delete_webcapture_edit(&self, param_editgroup_id: String, param_edit_id: String, context: &Context) -> Box + Send> { + fn delete_webcapture_edit(&self, param_editgroup_id: String, param_edit_id: String, context: &Context) -> Box + Send> { let url = format!( "{}/v0/editgroup/{editgroup_id}/webcapture/edit/{edit_id}", self.base_path, @@ -6419,7 +6424,13 @@ impl Api for Client { Box::new(futures::done(result)) } - fn get_webcapture(&self, param_ident: String, param_expand: Option, param_hide: Option, context: &Context) -> Box + Send> { + fn get_webcapture( + &self, + param_ident: String, + param_expand: Option, + param_hide: Option, + context: &Context, + ) -> Box + Send> { // Query parameters let query_expand = param_expand.map_or_else(String::new, |query| format!("expand={expand}&", expand = query.to_string())); let query_hide = param_hide.map_or_else(String::new, |query| format!("hide={hide}&", hide = query.to_string())); @@ -6489,7 +6500,7 @@ impl Api for Client { Box::new(futures::done(result)) } - fn get_webcapture_edit(&self, param_edit_id: String, context: &Context) -> Box + Send> { + fn get_webcapture_edit(&self, param_edit_id: String, context: &Context) -> Box + Send> { let url = format!( "{}/v0/webcapture/edit/{edit_id}", self.base_path, @@ -6553,7 +6564,7 @@ impl Api for Client { Box::new(futures::done(result)) } - fn get_webcapture_history(&self, param_ident: String, param_limit: Option, context: &Context) -> Box + Send> { + fn get_webcapture_history(&self, param_ident: String, param_limit: Option, context: &Context) -> Box + Send> { // Query parameters let query_limit = param_limit.map_or_else(String::new, |query| format!("limit={limit}&", limit = query.to_string())); @@ -6621,7 +6632,7 @@ impl Api for Client { Box::new(futures::done(result)) } - fn get_webcapture_redirects(&self, param_ident: String, context: &Context) -> Box + Send> { + fn get_webcapture_redirects(&self, param_ident: String, context: &Context) -> Box + Send> { let url = format!( "{}/v0/webcapture/{ident}/redirects", self.base_path, @@ -6691,7 +6702,7 @@ impl Api for Client { param_expand: Option, param_hide: Option, context: &Context, - ) -> Box + Send> { + ) -> Box + Send> { // Query parameters let query_expand = param_expand.map_or_else(String::new, |query| format!("expand={expand}&", expand = query.to_string())); let query_hide = param_hide.map_or_else(String::new, |query| format!("hide={hide}&", hide = query.to_string())); @@ -6767,7 +6778,7 @@ impl Api for Client { param_ident: String, param_entity: models::WebcaptureEntity, context: &Context, - ) -> Box + Send> { + ) -> Box + Send> { let url = format!( "{}/v0/editgroup/{editgroup_id}/webcapture/{ident}", self.base_path, @@ -6859,7 +6870,7 @@ impl Api for Client { Box::new(futures::done(result)) } - fn create_work(&self, param_editgroup_id: String, param_entity: models::WorkEntity, context: &Context) -> Box + Send> { + fn create_work(&self, param_editgroup_id: String, param_entity: models::WorkEntity, context: &Context) -> Box + Send> { let url = format!( "{}/v0/editgroup/{editgroup_id}/work", self.base_path, @@ -6950,7 +6961,7 @@ impl Api for Client { Box::new(futures::done(result)) } - fn create_work_auto_batch(&self, param_auto_batch: models::WorkAutoBatch, context: &Context) -> Box + Send> { + fn create_work_auto_batch(&self, param_auto_batch: models::WorkAutoBatch, context: &Context) -> Box + Send> { let url = format!("{}/v0/editgroup/auto/work/batch", self.base_path); let body = serde_json::to_string(¶m_auto_batch).expect("impossible to fail to serialize"); @@ -7037,7 +7048,7 @@ impl Api for Client { Box::new(futures::done(result)) } - fn delete_work(&self, param_editgroup_id: String, param_ident: String, context: &Context) -> Box + Send> { + fn delete_work(&self, param_editgroup_id: String, param_ident: String, context: &Context) -> Box + Send> { let url = format!( "{}/v0/editgroup/{editgroup_id}/work/{ident}", self.base_path, @@ -7124,7 +7135,7 @@ impl Api for Client { Box::new(futures::done(result)) } - fn delete_work_edit(&self, param_editgroup_id: String, param_edit_id: String, context: &Context) -> Box + Send> { + fn delete_work_edit(&self, param_editgroup_id: String, param_edit_id: String, context: &Context) -> Box + Send> { let url = format!( "{}/v0/editgroup/{editgroup_id}/work/edit/{edit_id}", self.base_path, @@ -7211,7 +7222,7 @@ impl Api for Client { Box::new(futures::done(result)) } - fn get_work(&self, param_ident: String, param_expand: Option, param_hide: Option, context: &Context) -> Box + Send> { + fn get_work(&self, param_ident: String, param_expand: Option, param_hide: Option, context: &Context) -> Box + Send> { // Query parameters let query_expand = param_expand.map_or_else(String::new, |query| format!("expand={expand}&", expand = query.to_string())); let query_hide = param_hide.map_or_else(String::new, |query| format!("hide={hide}&", hide = query.to_string())); @@ -7281,7 +7292,7 @@ impl Api for Client { Box::new(futures::done(result)) } - fn get_work_edit(&self, param_edit_id: String, context: &Context) -> Box + Send> { + fn get_work_edit(&self, param_edit_id: String, context: &Context) -> Box + Send> { let url = format!( "{}/v0/work/edit/{edit_id}", self.base_path, @@ -7345,7 +7356,7 @@ impl Api for Client { Box::new(futures::done(result)) } - fn get_work_history(&self, param_ident: String, param_limit: Option, context: &Context) -> Box + Send> { + fn get_work_history(&self, param_ident: String, param_limit: Option, context: &Context) -> Box + Send> { // Query parameters let query_limit = param_limit.map_or_else(String::new, |query| format!("limit={limit}&", limit = query.to_string())); @@ -7413,7 +7424,7 @@ impl Api for Client { Box::new(futures::done(result)) } - fn get_work_redirects(&self, param_ident: String, context: &Context) -> Box + Send> { + fn get_work_redirects(&self, param_ident: String, context: &Context) -> Box + Send> { let url = format!( "{}/v0/work/{ident}/redirects", self.base_path, @@ -7477,7 +7488,7 @@ impl Api for Client { Box::new(futures::done(result)) } - fn get_work_releases(&self, param_ident: String, param_hide: Option, context: &Context) -> Box + Send> { + fn get_work_releases(&self, param_ident: String, param_hide: Option, context: &Context) -> Box + Send> { // Query parameters let query_hide = param_hide.map_or_else(String::new, |query| format!("hide={hide}&", hide = query.to_string())); @@ -7551,7 +7562,7 @@ impl Api for Client { param_expand: Option, param_hide: Option, context: &Context, - ) -> Box + Send> { + ) -> Box + Send> { // Query parameters let query_expand = param_expand.map_or_else(String::new, |query| format!("expand={expand}&", expand = query.to_string())); let query_hide = param_hide.map_or_else(String::new, |query| format!("hide={hide}&", hide = query.to_string())); @@ -7621,7 +7632,7 @@ impl Api for Client { Box::new(futures::done(result)) } - fn update_work(&self, param_editgroup_id: String, param_ident: String, param_entity: models::WorkEntity, context: &Context) -> Box + Send> { + fn update_work(&self, param_editgroup_id: String, param_ident: String, param_entity: models::WorkEntity, context: &Context) -> Box + Send> { let url = format!( "{}/v0/editgroup/{editgroup_id}/work/{ident}", self.base_path, @@ -7736,7 +7747,7 @@ impl From for ClientInitError { impl fmt::Display for ClientInitError { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - (self as &fmt::Debug).fmt(f) + (self as &dyn fmt::Debug).fmt(f) } } -- cgit v1.2.3