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
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
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 ReviewsListRequest<'a> {
    pub(crate) http_client: &'a JyveClient,
    pub created_at_gte: Option<String>,
    pub created_at_lt: Option<String>,
    pub created_at_lte: Option<String>,
    pub escalation_statuses: Option<String>,
    pub escalation_statuses_or_status: Option<String>,
    pub id: Option<f64>,
    pub ids: Option<String>,
    pub local_created_at_gte: Option<String>,
    pub local_created_at_lt: Option<String>,
    pub local_responses_created_at_gte: Option<String>,
    pub local_responses_created_at_lt: Option<String>,
    pub object_id: Option<f64>,
    pub only_active: Option<String>,
    pub ordering: Option<String>,
    pub page: Option<i64>,
    pub page_size: Option<i64>,
    pub responses_created_at_gte: Option<String>,
    pub responses_created_at_lt: Option<String>,
    pub responses_created_at_lte: Option<String>,
    pub status: Option<String>,
    pub statuses: Option<String>,
}
impl<'a> ReviewsListRequest<'a> {
    pub async fn send(self) -> ::httpclient::InMemoryResult<Vec<Review>> {
        let mut r = self.http_client.client.get("/reviews/");
        if let Some(ref unwrapped) = self.created_at_gte {
            r = r.query("created_at__gte", &unwrapped.to_string());
        }
        if let Some(ref unwrapped) = self.created_at_lt {
            r = r.query("created_at__lt", &unwrapped.to_string());
        }
        if let Some(ref unwrapped) = self.created_at_lte {
            r = r.query("created_at__lte", &unwrapped.to_string());
        }
        if let Some(ref unwrapped) = self.escalation_statuses {
            r = r.query("escalation_statuses", &unwrapped.to_string());
        }
        if let Some(ref unwrapped) = self.escalation_statuses_or_status {
            r = r.query("escalation_statuses_or_status", &unwrapped.to_string());
        }
        if let Some(ref unwrapped) = self.id {
            r = r.query("id", &unwrapped.to_string());
        }
        if let Some(ref unwrapped) = self.ids {
            r = r.query("ids", &unwrapped.to_string());
        }
        if let Some(ref unwrapped) = self.local_created_at_gte {
            r = r.query("local_created_at__gte", &unwrapped.to_string());
        }
        if let Some(ref unwrapped) = self.local_created_at_lt {
            r = r.query("local_created_at__lt", &unwrapped.to_string());
        }
        if let Some(ref unwrapped) = self.local_responses_created_at_gte {
            r = r.query("local_responses__created_at__gte", &unwrapped.to_string());
        }
        if let Some(ref unwrapped) = self.local_responses_created_at_lt {
            r = r.query("local_responses__created_at__lt", &unwrapped.to_string());
        }
        if let Some(ref unwrapped) = self.object_id {
            r = r.query("object_id", &unwrapped.to_string());
        }
        if let Some(ref unwrapped) = self.only_active {
            r = r.query("only_active", &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.responses_created_at_gte {
            r = r.query("responses__created_at__gte", &unwrapped.to_string());
        }
        if let Some(ref unwrapped) = self.responses_created_at_lt {
            r = r.query("responses__created_at__lt", &unwrapped.to_string());
        }
        if let Some(ref unwrapped) = self.responses_created_at_lte {
            r = r.query("responses__created_at__lte", &unwrapped.to_string());
        }
        if let Some(ref unwrapped) = self.status {
            r = r.query("status", &unwrapped.to_string());
        }
        if let Some(ref unwrapped) = self.statuses {
            r = r.query("statuses", &unwrapped.to_string());
        }
        r = self.http_client.authenticate(r);
        let res = r.send_awaiting_body().await?;
        res.json()
    }
    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 created_at_lt(mut self, created_at_lt: &str) -> Self {
        self.created_at_lt = Some(created_at_lt.to_owned());
        self
    }
    pub fn created_at_lte(mut self, created_at_lte: &str) -> Self {
        self.created_at_lte = Some(created_at_lte.to_owned());
        self
    }
    pub fn escalation_statuses(mut self, escalation_statuses: &str) -> Self {
        self.escalation_statuses = Some(escalation_statuses.to_owned());
        self
    }
    pub fn escalation_statuses_or_status(mut self, escalation_statuses_or_status: &str) -> Self {
        self.escalation_statuses_or_status = Some(escalation_statuses_or_status.to_owned());
        self
    }
    pub fn id(mut self, id: f64) -> Self {
        self.id = Some(id);
        self
    }
    pub fn ids(mut self, ids: &str) -> Self {
        self.ids = Some(ids.to_owned());
        self
    }
    pub fn local_created_at_gte(mut self, local_created_at_gte: &str) -> Self {
        self.local_created_at_gte = Some(local_created_at_gte.to_owned());
        self
    }
    pub fn local_created_at_lt(mut self, local_created_at_lt: &str) -> Self {
        self.local_created_at_lt = Some(local_created_at_lt.to_owned());
        self
    }
    pub fn local_responses_created_at_gte(mut self, local_responses_created_at_gte: &str) -> Self {
        self.local_responses_created_at_gte = Some(local_responses_created_at_gte.to_owned());
        self
    }
    pub fn local_responses_created_at_lt(mut self, local_responses_created_at_lt: &str) -> Self {
        self.local_responses_created_at_lt = Some(local_responses_created_at_lt.to_owned());
        self
    }
    pub fn object_id(mut self, object_id: f64) -> Self {
        self.object_id = Some(object_id);
        self
    }
    pub fn only_active(mut self, only_active: &str) -> Self {
        self.only_active = Some(only_active.to_owned());
        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 responses_created_at_gte(mut self, responses_created_at_gte: &str) -> Self {
        self.responses_created_at_gte = Some(responses_created_at_gte.to_owned());
        self
    }
    pub fn responses_created_at_lt(mut self, responses_created_at_lt: &str) -> Self {
        self.responses_created_at_lt = Some(responses_created_at_lt.to_owned());
        self
    }
    pub fn responses_created_at_lte(mut self, responses_created_at_lte: &str) -> Self {
        self.responses_created_at_lte = Some(responses_created_at_lte.to_owned());
        self
    }
    pub fn status(mut self, status: &str) -> Self {
        self.status = Some(status.to_owned());
        self
    }
    pub fn statuses(mut self, statuses: &str) -> Self {
        self.statuses = Some(statuses.to_owned());
        self
    }
}
impl<'a> ::std::future::IntoFuture for ReviewsListRequest<'a> {
    type Output = httpclient::InMemoryResult<Vec<Review>>;
    type IntoFuture = ::futures::future::BoxFuture<'a, Self::Output>;
    fn into_future(self) -> Self::IntoFuture {
        Box::pin(self.send())
    }
}