Skip to main content

mobilitydata_client/models/
redirect.rs

1/*
2 * Mobility Database Catalog
3 *
4 * API for the Mobility Database Catalog. See [https://mobilitydatabase.org/](https://mobilitydatabase.org/).  The Mobility Database API uses OAuth2 authentication. To initiate a successful API request, an access token must be included as a bearer token in the HTTP header. Access tokens are valid for one hour. To obtain an access token, you'll first need a refresh token, which is long-lived and does not expire. 
5 *
6 * The version of the OpenAPI document: 1.0.0
7 * Contact: api@mobilitydata.org
8 * Generated by: https://openapi-generator.tech
9 */
10
11use crate::models;
12use serde::{Deserialize, Serialize};
13
14#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
15pub struct Redirect {
16    /// The feed ID that should be used in replacement of the current one.
17    #[serde(rename = "target_id", skip_serializing_if = "Option::is_none")]
18    pub target_id: Option<String>,
19    /// A comment explaining the redirect.
20    #[serde(rename = "comment", skip_serializing_if = "Option::is_none")]
21    pub comment: Option<String>,
22}
23
24impl Redirect {
25    pub fn new() -> Redirect {
26        Redirect {
27            target_id: None,
28            comment: None,
29        }
30    }
31}
32