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
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 StoresListStatsRequest<'a> {
    pub(crate) http_client: &'a JyveClient,
    pub address: Option<String>,
    pub brand_territory_brand_public_id: Option<String>,
    pub chain_name: Option<String>,
    pub city: Option<String>,
    pub county: Option<String>,
    pub ids: Option<String>,
    pub job_completed_range: Option<String>,
    pub job_ids: Option<String>,
    pub jyver_density_gte: Option<f64>,
    pub ordering: Option<String>,
    pub page: Option<i64>,
    pub page_size: Option<i64>,
    pub postal_code: Option<String>,
    pub primary_self_identity: Option<String>,
    pub q: Option<String>,
    pub state: Option<String>,
    pub store_chain: Option<f64>,
    pub store_chains: Option<String>,
}
impl<'a> StoresListStatsRequest<'a> {
    pub async fn send(self) -> ::httpclient::InMemoryResult<Vec<Store>> {
        let mut r = self.http_client.client.get("/stores/stats/");
        if let Some(ref unwrapped) = self.address {
            r = r.query("address", &unwrapped.to_string());
        }
        if let Some(ref unwrapped) = self.brand_territory_brand_public_id {
            r = r.query("brand_territory_brand_public_id", &unwrapped.to_string());
        }
        if let Some(ref unwrapped) = self.chain_name {
            r = r.query("chain_name", &unwrapped.to_string());
        }
        if let Some(ref unwrapped) = self.city {
            r = r.query("city", &unwrapped.to_string());
        }
        if let Some(ref unwrapped) = self.county {
            r = r.query("county", &unwrapped.to_string());
        }
        if let Some(ref unwrapped) = self.ids {
            r = r.query("ids", &unwrapped.to_string());
        }
        if let Some(ref unwrapped) = self.job_completed_range {
            r = r.query("job_completed_range", &unwrapped.to_string());
        }
        if let Some(ref unwrapped) = self.job_ids {
            r = r.query("job_ids", &unwrapped.to_string());
        }
        if let Some(ref unwrapped) = self.jyver_density_gte {
            r = r.query("jyver_density__gte", &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.postal_code {
            r = r.query("postal_code", &unwrapped.to_string());
        }
        if let Some(ref unwrapped) = self.primary_self_identity {
            r = r.query("primary_self_identity", &unwrapped.to_string());
        }
        if let Some(ref unwrapped) = self.q {
            r = r.query("q", &unwrapped.to_string());
        }
        if let Some(ref unwrapped) = self.state {
            r = r.query("state", &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());
        }
        r = self.http_client.authenticate(r);
        let res = r.send_awaiting_body().await?;
        res.json()
    }
    pub fn address(mut self, address: &str) -> Self {
        self.address = Some(address.to_owned());
        self
    }
    pub fn brand_territory_brand_public_id(mut self, brand_territory_brand_public_id: &str) -> Self {
        self.brand_territory_brand_public_id = Some(brand_territory_brand_public_id.to_owned());
        self
    }
    pub fn chain_name(mut self, chain_name: &str) -> Self {
        self.chain_name = Some(chain_name.to_owned());
        self
    }
    pub fn city(mut self, city: &str) -> Self {
        self.city = Some(city.to_owned());
        self
    }
    pub fn county(mut self, county: &str) -> Self {
        self.county = Some(county.to_owned());
        self
    }
    pub fn ids(mut self, ids: &str) -> Self {
        self.ids = Some(ids.to_owned());
        self
    }
    pub fn job_completed_range(mut self, job_completed_range: &str) -> Self {
        self.job_completed_range = Some(job_completed_range.to_owned());
        self
    }
    pub fn job_ids(mut self, job_ids: &str) -> Self {
        self.job_ids = Some(job_ids.to_owned());
        self
    }
    pub fn jyver_density_gte(mut self, jyver_density_gte: f64) -> Self {
        self.jyver_density_gte = Some(jyver_density_gte);
        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 postal_code(mut self, postal_code: &str) -> Self {
        self.postal_code = Some(postal_code.to_owned());
        self
    }
    pub fn primary_self_identity(mut self, primary_self_identity: &str) -> Self {
        self.primary_self_identity = Some(primary_self_identity.to_owned());
        self
    }
    pub fn q(mut self, q: &str) -> Self {
        self.q = Some(q.to_owned());
        self
    }
    pub fn state(mut self, state: &str) -> Self {
        self.state = Some(state.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
    }
}
impl<'a> ::std::future::IntoFuture for StoresListStatsRequest<'a> {
    type Output = httpclient::InMemoryResult<Vec<Store>>;
    type IntoFuture = ::futures::future::BoxFuture<'a, Self::Output>;
    fn into_future(self) -> Self::IntoFuture {
        Box::pin(self.send())
    }
}