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
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 DeliveriesListRequest<'a> {
    pub(crate) http_client: &'a JyveClient,
    pub arrival_time_gt: Option<String>,
    pub arrival_time_gte: Option<String>,
    pub arrival_time_lt: Option<String>,
    pub arrival_time_lte: Option<String>,
    pub date_completed_gt: Option<String>,
    pub date_completed_gte: Option<String>,
    pub date_completed_lt: Option<String>,
    pub date_completed_lte: Option<String>,
    pub has_been_completed: Option<String>,
    pub id: Option<f64>,
    pub ids: Option<String>,
    pub ordering: Option<String>,
    pub page: Option<i64>,
    pub page_size: Option<i64>,
    pub store_groups: Option<String>,
    pub store_location: Option<f64>,
    pub store_locations: Option<String>,
}
impl<'a> DeliveriesListRequest<'a> {
    pub async fn send(self) -> ::httpclient::InMemoryResult<Vec<Delivery>> {
        let mut r = self.http_client.client.get("/deliveries/");
        if let Some(ref unwrapped) = self.arrival_time_gt {
            r = r.query("arrival_time__gt", &unwrapped.to_string());
        }
        if let Some(ref unwrapped) = self.arrival_time_gte {
            r = r.query("arrival_time__gte", &unwrapped.to_string());
        }
        if let Some(ref unwrapped) = self.arrival_time_lt {
            r = r.query("arrival_time__lt", &unwrapped.to_string());
        }
        if let Some(ref unwrapped) = self.arrival_time_lte {
            r = r.query("arrival_time__lte", &unwrapped.to_string());
        }
        if let Some(ref unwrapped) = self.date_completed_gt {
            r = r.query("date_completed__gt", &unwrapped.to_string());
        }
        if let Some(ref unwrapped) = self.date_completed_gte {
            r = r.query("date_completed__gte", &unwrapped.to_string());
        }
        if let Some(ref unwrapped) = self.date_completed_lt {
            r = r.query("date_completed__lt", &unwrapped.to_string());
        }
        if let Some(ref unwrapped) = self.date_completed_lte {
            r = r.query("date_completed__lte", &unwrapped.to_string());
        }
        if let Some(ref unwrapped) = self.has_been_completed {
            r = r.query("has_been_completed", &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.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.store_groups {
            r = r.query("store_groups", &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());
        }
        r = self.http_client.authenticate(r);
        let res = r.send_awaiting_body().await?;
        res.json()
    }
    pub fn arrival_time_gt(mut self, arrival_time_gt: &str) -> Self {
        self.arrival_time_gt = Some(arrival_time_gt.to_owned());
        self
    }
    pub fn arrival_time_gte(mut self, arrival_time_gte: &str) -> Self {
        self.arrival_time_gte = Some(arrival_time_gte.to_owned());
        self
    }
    pub fn arrival_time_lt(mut self, arrival_time_lt: &str) -> Self {
        self.arrival_time_lt = Some(arrival_time_lt.to_owned());
        self
    }
    pub fn arrival_time_lte(mut self, arrival_time_lte: &str) -> Self {
        self.arrival_time_lte = Some(arrival_time_lte.to_owned());
        self
    }
    pub fn date_completed_gt(mut self, date_completed_gt: &str) -> Self {
        self.date_completed_gt = Some(date_completed_gt.to_owned());
        self
    }
    pub fn date_completed_gte(mut self, date_completed_gte: &str) -> Self {
        self.date_completed_gte = Some(date_completed_gte.to_owned());
        self
    }
    pub fn date_completed_lt(mut self, date_completed_lt: &str) -> Self {
        self.date_completed_lt = Some(date_completed_lt.to_owned());
        self
    }
    pub fn date_completed_lte(mut self, date_completed_lte: &str) -> Self {
        self.date_completed_lte = Some(date_completed_lte.to_owned());
        self
    }
    pub fn has_been_completed(mut self, has_been_completed: &str) -> Self {
        self.has_been_completed = Some(has_been_completed.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 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 store_groups(mut self, store_groups: &str) -> Self {
        self.store_groups = Some(store_groups.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
    }
}
impl<'a> ::std::future::IntoFuture for DeliveriesListRequest<'a> {
    type Output = httpclient::InMemoryResult<Vec<Delivery>>;
    type IntoFuture = ::futures::future::BoxFuture<'a, Self::Output>;
    fn into_future(self) -> Self::IntoFuture {
        Box::pin(self.send())
    }
}