hcloud/models/
resource.rs

1/*
2 * Hetzner Cloud API
3 *
4 * Copied from the official API documentation for the Public Hetzner Cloud.
5 *
6 * The version of the OpenAPI document: 0.28.0
7 *
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 Resource {
16    /// ID of the Resource. | ID of resource referenced.
17    #[serde(rename = "id")]
18    pub id: i64,
19    /// Type of the Resource. | Type of resource referenced.
20    #[serde(rename = "type")]
21    pub r#type: String,
22}
23
24impl Resource {
25    pub fn new(id: i64, r#type: String) -> Resource {
26        Resource { id, r#type }
27    }
28}