lta/get_traffic_speed_bands/
parts.rs1#![allow(
3 clippy::doc_markdown,
4 clippy::missing_errors_doc,
5 clippy::must_use_candidate,
6 clippy::needless_pass_by_value,
7 clippy::return_self_not_must_use,
8 clippy::single_match_else
9)]
10
11use super::super::types::TrafficSpeedBand;
12#[derive(Debug, Clone, PartialEq)]
16pub struct GetTrafficSpeedBandsInput {
17 pub skip: Option<u32>,
19}
20impl GetTrafficSpeedBandsInput {
21 pub fn new() -> Self {
22 Self { skip: None }
23 }
24 pub fn skip(mut self, skip: u32) -> Self {
25 self.skip = Some(skip);
26 self
27 }
28}
29impl Default for GetTrafficSpeedBandsInput {
30 fn default() -> Self {
31 Self::new()
32 }
33}
34#[derive(Debug, Clone, PartialEq)]
38pub enum GetTrafficSpeedBandsResponse {
39 Ok(Vec<TrafficSpeedBand>),
41 UnexpectedStatus(http::StatusCode, Vec<u8>),
42}
43pub fn get_traffic_speed_bands_parts(
47 input: GetTrafficSpeedBandsInput,
48) -> Result<satay_runtime::RequestParts<()>, satay_runtime::Error> {
49 let mut uri = String::with_capacity(21);
50 uri.push_str("/v3/TrafficSpeedBands");
51 let mut first_query = true;
52 if let Some(value) = &input.skip {
53 satay_runtime::append_query_pair(&mut uri, &mut first_query, "$skip", &value.to_string());
54 }
55 let headers = http::HeaderMap::new();
56 Ok(satay_runtime::RequestParts {
57 method: http::Method::GET,
58 uri,
59 headers,
60 body: (),
61 })
62}