nile_client_rs/models/
instance.rs

1/*
2 * Nile API
3 *
4 * Making SaaS chill.
5 *
6 * The version of the OpenAPI document: 0.1.0-fdd7cd5
7 * Contact: support@thenile.dev
8 * Generated by: https://openapi-generator.tech
9 */
10
11#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)]
12pub struct Instance {
13    #[serde(rename = "id")]
14    pub id: String,
15    #[serde(rename = "created", skip_serializing_if = "Option::is_none")]
16    pub created: Option<String>,
17    #[serde(rename = "updated", skip_serializing_if = "Option::is_none")]
18    pub updated: Option<String>,
19    #[serde(rename = "seq", skip_serializing_if = "Option::is_none")]
20    pub seq: Option<i64>,
21    /// The entity type of this instance
22    #[serde(rename = "type")]
23    pub r#type: String,
24    #[serde(rename = "deleted", skip_serializing_if = "Option::is_none")]
25    pub deleted: Option<String>,
26    /// An *instance* of a JSON Schema
27    #[serde(rename = "properties")]
28    pub properties: serde_json::Value,
29    /// The id of the organization that this instance belongs to
30    #[serde(rename = "org")]
31    pub org: String,
32}
33
34impl Instance {
35    pub fn new(id: String, r#type: String, properties: serde_json::Value, org: String) -> Instance {
36        Instance {
37            id,
38            created: None,
39            updated: None,
40            seq: None,
41            r#type,
42            deleted: None,
43            properties,
44            org,
45        }
46    }
47}
48
49use serde::{Deserialize, Serialize};