Skip to main content

mobilitydata_client/models/
license_base.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 LicenseBase {
16    /// Unique identifier for the license.
17    #[serde(rename = "id", skip_serializing_if = "Option::is_none")]
18    pub id: Option<String>,
19    /// The type of license.
20    #[serde(rename = "type", skip_serializing_if = "Option::is_none")]
21    pub r#type: Option<String>,
22    /// true if license id spdx.
23    #[serde(rename = "is_spdx", skip_serializing_if = "Option::is_none")]
24    pub is_spdx: Option<bool>,
25    /// The user facing name of the license.
26    #[serde(rename = "name", skip_serializing_if = "Option::is_none")]
27    pub name: Option<String>,
28    /// A URL where to find the license for the feed.
29    #[serde(rename = "url", skip_serializing_if = "Option::is_none")]
30    pub url: Option<String>,
31    /// The description of the license.
32    #[serde(rename = "description", skip_serializing_if = "Option::is_none")]
33    pub description: Option<String>,
34    /// The date and time the license was added to the database, in ISO 8601 date-time format.
35    #[serde(rename = "created_at", skip_serializing_if = "Option::is_none")]
36    pub created_at: Option<String>,
37    /// The last date and time the license was updated in the database, in ISO 8601 date-time format.
38    #[serde(rename = "updated_at", skip_serializing_if = "Option::is_none")]
39    pub updated_at: Option<String>,
40}
41
42impl LicenseBase {
43    pub fn new() -> LicenseBase {
44        LicenseBase {
45            id: None,
46            r#type: None,
47            is_spdx: None,
48            name: None,
49            url: None,
50            description: None,
51            created_at: None,
52            updated_at: None,
53        }
54    }
55}
56