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 crate::model::*;
use crate::JyveClient;
use serde_json::json;
/**Create this with the associated client method.

That method takes required values as arguments. Set optional values using builder methods on this struct.*/
#[derive(Clone)]
pub struct NotificationsListRequest<'a> {
    pub(crate) http_client: &'a JyveClient,
    pub action_was_taken: Option<String>,
    pub created_at_gte: Option<String>,
    pub id: Option<f64>,
    pub ordering: Option<String>,
    pub page: Option<i64>,
    pub page_size: Option<i64>,
    pub should_hide: Option<String>,
    pub updated_at_gte: Option<String>,
}
impl<'a> NotificationsListRequest<'a> {
    pub async fn send(self) -> ::httpclient::InMemoryResult<Vec<Notification>> {
        let mut r = self.http_client.client.get("/notifications/");
        if let Some(ref unwrapped) = self.action_was_taken {
            r = r.query("action_was_taken", &unwrapped.to_string());
        }
        if let Some(ref unwrapped) = self.created_at_gte {
            r = r.query("created_at__gte", &unwrapped.to_string());
        }
        if let Some(ref unwrapped) = self.id {
            r = r.query("id", &unwrapped.to_string());
        }
        if let Some(ref unwrapped) = self.ordering {
            r = r.query("ordering", &unwrapped.to_string());
        }
        if let Some(ref unwrapped) = self.page {
            r = r.query("page", &unwrapped.to_string());
        }
        if let Some(ref unwrapped) = self.page_size {
            r = r.query("page_size", &unwrapped.to_string());
        }
        if let Some(ref unwrapped) = self.should_hide {
            r = r.query("should_hide", &unwrapped.to_string());
        }
        if let Some(ref unwrapped) = self.updated_at_gte {
            r = r.query("updated_at__gte", &unwrapped.to_string());
        }
        r = self.http_client.authenticate(r);
        let res = r.send_awaiting_body().await?;
        res.json()
    }
    pub fn action_was_taken(mut self, action_was_taken: &str) -> Self {
        self.action_was_taken = Some(action_was_taken.to_owned());
        self
    }
    pub fn created_at_gte(mut self, created_at_gte: &str) -> Self {
        self.created_at_gte = Some(created_at_gte.to_owned());
        self
    }
    pub fn id(mut self, id: f64) -> Self {
        self.id = Some(id);
        self
    }
    pub fn ordering(mut self, ordering: &str) -> Self {
        self.ordering = Some(ordering.to_owned());
        self
    }
    pub fn page(mut self, page: i64) -> Self {
        self.page = Some(page);
        self
    }
    pub fn page_size(mut self, page_size: i64) -> Self {
        self.page_size = Some(page_size);
        self
    }
    pub fn should_hide(mut self, should_hide: &str) -> Self {
        self.should_hide = Some(should_hide.to_owned());
        self
    }
    pub fn updated_at_gte(mut self, updated_at_gte: &str) -> Self {
        self.updated_at_gte = Some(updated_at_gte.to_owned());
        self
    }
}
impl<'a> ::std::future::IntoFuture for NotificationsListRequest<'a> {
    type Output = httpclient::InMemoryResult<Vec<Notification>>;
    type IntoFuture = ::futures::future::BoxFuture<'a, Self::Output>;
    fn into_future(self) -> Self::IntoFuture {
        Box::pin(self.send())
    }
}