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
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
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 TasksListRequest<'a> {
    pub(crate) http_client: &'a JyveClient,
    pub brand: Option<f64>,
    pub client: Option<String>,
    pub client_slug: Option<String>,
    pub completed_after: Option<String>,
    pub completed_before: Option<String>,
    pub id: Option<f64>,
    pub ids: Option<String>,
    pub job: Option<String>,
    pub job_completed_after: Option<String>,
    pub job_completed_after_gt: Option<String>,
    pub job_completed_after_gte: Option<String>,
    pub job_completed_before: Option<String>,
    pub job_completed_before_lt: Option<String>,
    pub job_completed_before_lte: Option<String>,
    pub jobs: Option<String>,
    pub page: Option<i64>,
    pub page_size: Option<i64>,
    pub status: Option<String>,
    pub store_chain: Option<f64>,
    pub store_chains: Option<String>,
    pub store_location: Option<f64>,
    pub store_locations: Option<String>,
    pub type_: Option<String>,
    pub types: Option<String>,
    pub user: Option<f64>,
}
impl<'a> TasksListRequest<'a> {
    pub async fn send(self) -> ::httpclient::InMemoryResult<Vec<Task>> {
        let mut r = self.http_client.client.get("/tasks/");
        if let Some(ref unwrapped) = self.brand {
            r = r.query("brand", &unwrapped.to_string());
        }
        if let Some(ref unwrapped) = self.client {
            r = r.query("client", &unwrapped.to_string());
        }
        if let Some(ref unwrapped) = self.client_slug {
            r = r.query("client_slug", &unwrapped.to_string());
        }
        if let Some(ref unwrapped) = self.completed_after {
            r = r.query("completed_after", &unwrapped.to_string());
        }
        if let Some(ref unwrapped) = self.completed_before {
            r = r.query("completed_before", &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.job {
            r = r.query("job", &unwrapped.to_string());
        }
        if let Some(ref unwrapped) = self.job_completed_after {
            r = r.query("job_completed_after", &unwrapped.to_string());
        }
        if let Some(ref unwrapped) = self.job_completed_after_gt {
            r = r.query("job_completed_after__gt", &unwrapped.to_string());
        }
        if let Some(ref unwrapped) = self.job_completed_after_gte {
            r = r.query("job_completed_after__gte", &unwrapped.to_string());
        }
        if let Some(ref unwrapped) = self.job_completed_before {
            r = r.query("job_completed_before", &unwrapped.to_string());
        }
        if let Some(ref unwrapped) = self.job_completed_before_lt {
            r = r.query("job_completed_before__lt", &unwrapped.to_string());
        }
        if let Some(ref unwrapped) = self.job_completed_before_lte {
            r = r.query("job_completed_before__lte", &unwrapped.to_string());
        }
        if let Some(ref unwrapped) = self.jobs {
            r = r.query("jobs", &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.status {
            r = r.query("status", &unwrapped.to_string());
        }
        if let Some(ref unwrapped) = self.store_chain {
            r = r.query("store_chain", &unwrapped.to_string());
        }
        if let Some(ref unwrapped) = self.store_chains {
            r = r.query("store_chains", &unwrapped.to_string());
        }
        if let Some(ref unwrapped) = self.store_location {
            r = r.query("store_location", &unwrapped.to_string());
        }
        if let Some(ref unwrapped) = self.store_locations {
            r = r.query("store_locations", &unwrapped.to_string());
        }
        if let Some(ref unwrapped) = self.type_ {
            r = r.query("type", &unwrapped.to_string());
        }
        if let Some(ref unwrapped) = self.types {
            r = r.query("types", &unwrapped.to_string());
        }
        if let Some(ref unwrapped) = self.user {
            r = r.query("user", &unwrapped.to_string());
        }
        r = self.http_client.authenticate(r);
        let res = r.send_awaiting_body().await?;
        res.json()
    }
    pub fn brand(mut self, brand: f64) -> Self {
        self.brand = Some(brand);
        self
    }
    pub fn client(mut self, client: &str) -> Self {
        self.client = Some(client.to_owned());
        self
    }
    pub fn client_slug(mut self, client_slug: &str) -> Self {
        self.client_slug = Some(client_slug.to_owned());
        self
    }
    pub fn completed_after(mut self, completed_after: &str) -> Self {
        self.completed_after = Some(completed_after.to_owned());
        self
    }
    pub fn completed_before(mut self, completed_before: &str) -> Self {
        self.completed_before = Some(completed_before.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 job(mut self, job: &str) -> Self {
        self.job = Some(job.to_owned());
        self
    }
    pub fn job_completed_after(mut self, job_completed_after: &str) -> Self {
        self.job_completed_after = Some(job_completed_after.to_owned());
        self
    }
    pub fn job_completed_after_gt(mut self, job_completed_after_gt: &str) -> Self {
        self.job_completed_after_gt = Some(job_completed_after_gt.to_owned());
        self
    }
    pub fn job_completed_after_gte(mut self, job_completed_after_gte: &str) -> Self {
        self.job_completed_after_gte = Some(job_completed_after_gte.to_owned());
        self
    }
    pub fn job_completed_before(mut self, job_completed_before: &str) -> Self {
        self.job_completed_before = Some(job_completed_before.to_owned());
        self
    }
    pub fn job_completed_before_lt(mut self, job_completed_before_lt: &str) -> Self {
        self.job_completed_before_lt = Some(job_completed_before_lt.to_owned());
        self
    }
    pub fn job_completed_before_lte(mut self, job_completed_before_lte: &str) -> Self {
        self.job_completed_before_lte = Some(job_completed_before_lte.to_owned());
        self
    }
    pub fn jobs(mut self, jobs: &str) -> Self {
        self.jobs = Some(jobs.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 status(mut self, status: &str) -> Self {
        self.status = Some(status.to_owned());
        self
    }
    pub fn store_chain(mut self, store_chain: f64) -> Self {
        self.store_chain = Some(store_chain);
        self
    }
    pub fn store_chains(mut self, store_chains: &str) -> Self {
        self.store_chains = Some(store_chains.to_owned());
        self
    }
    pub fn store_location(mut self, store_location: f64) -> Self {
        self.store_location = Some(store_location);
        self
    }
    pub fn store_locations(mut self, store_locations: &str) -> Self {
        self.store_locations = Some(store_locations.to_owned());
        self
    }
    pub fn type_(mut self, type_: &str) -> Self {
        self.type_ = Some(type_.to_owned());
        self
    }
    pub fn types(mut self, types: &str) -> Self {
        self.types = Some(types.to_owned());
        self
    }
    pub fn user(mut self, user: f64) -> Self {
        self.user = Some(user);
        self
    }
}
impl<'a> ::std::future::IntoFuture for TasksListRequest<'a> {
    type Output = httpclient::InMemoryResult<Vec<Task>>;
    type IntoFuture = ::futures::future::BoxFuture<'a, Self::Output>;
    fn into_future(self) -> Self::IntoFuture {
        Box::pin(self.send())
    }
}