1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
use std::rc::Rc;
use std::borrow::Borrow;
#[allow(unused_imports)]
use std::option::Option;
use hyper;
use serde_json;
use futures::Future;
use super::{Error, configuration};
use super::request as __internal_request;
pub struct ExpiredControllerApiClient<C: hyper::client::Connect> {
configuration: Rc<configuration::Configuration<C>>,
}
impl<C: hyper::client::Connect> ExpiredControllerApiClient<C> {
pub fn new(configuration: Rc<configuration::Configuration<C>>) -> ExpiredControllerApiClient<C> {
ExpiredControllerApiClient {
configuration,
}
}
}
pub trait ExpiredControllerApi {
fn get_expired_inbox_by_inbox_id(&self, inbox_id: &str) -> Box<dyn Future<Item = crate::models::ExpiredInboxDto, Error = Error<serde_json::Value>>>;
fn get_expired_inbox_record(&self, expired_id: &str) -> Box<dyn Future<Item = crate::models::ExpiredInboxDto, Error = Error<serde_json::Value>>>;
fn get_expired_inboxes(&self, page: Option<i32>, size: Option<i32>, sort: Option<&str>) -> Box<dyn Future<Item = crate::models::PageExpiredInboxRecordProjection, Error = Error<serde_json::Value>>>;
}
impl<C: hyper::client::Connect>ExpiredControllerApi for ExpiredControllerApiClient<C> {
fn get_expired_inbox_by_inbox_id(&self, inbox_id: &str) -> Box<dyn Future<Item = crate::models::ExpiredInboxDto, Error = Error<serde_json::Value>>> {
let mut req = __internal_request::Request::new(hyper::Method::Get, "/expired/inbox/{inboxId}".to_string())
.with_auth(__internal_request::Auth::ApiKey(__internal_request::ApiKey{
in_header: true,
in_query: false,
param_name: "x-api-key".to_owned(),
}))
;
req = req.with_path_param("inboxId".to_string(), inbox_id.to_string());
req.execute(self.configuration.borrow())
}
fn get_expired_inbox_record(&self, expired_id: &str) -> Box<dyn Future<Item = crate::models::ExpiredInboxDto, Error = Error<serde_json::Value>>> {
let mut req = __internal_request::Request::new(hyper::Method::Get, "/expired/{expiredId}".to_string())
.with_auth(__internal_request::Auth::ApiKey(__internal_request::ApiKey{
in_header: true,
in_query: false,
param_name: "x-api-key".to_owned(),
}))
;
req = req.with_path_param("expiredId".to_string(), expired_id.to_string());
req.execute(self.configuration.borrow())
}
fn get_expired_inboxes(&self, page: Option<i32>, size: Option<i32>, sort: Option<&str>) -> Box<dyn Future<Item = crate::models::PageExpiredInboxRecordProjection, Error = Error<serde_json::Value>>> {
let mut req = __internal_request::Request::new(hyper::Method::Get, "/expired".to_string())
.with_auth(__internal_request::Auth::ApiKey(__internal_request::ApiKey{
in_header: true,
in_query: false,
param_name: "x-api-key".to_owned(),
}))
;
if let Some(ref s) = page {
req = req.with_query_param("page".to_string(), s.to_string());
}
if let Some(ref s) = size {
req = req.with_query_param("size".to_string(), s.to_string());
}
if let Some(ref s) = sort {
req = req.with_query_param("sort".to_string(), s.to_string());
}
req.execute(self.configuration.borrow())
}
}