openapi_github/models/
project_card.rs1use crate::models;
12use serde::{Deserialize, Serialize};
13
14#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
15pub struct ProjectCard {
16 #[serde(rename = "after_id", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
17 pub after_id: Option<Option<i32>>,
18 #[serde(rename = "archived")]
20 pub archived: bool,
21 #[serde(rename = "column_id", deserialize_with = "Option::deserialize")]
22 pub column_id: Option<i32>,
23 #[serde(rename = "column_url")]
24 pub column_url: String,
25 #[serde(rename = "content_url", skip_serializing_if = "Option::is_none")]
26 pub content_url: Option<String>,
27 #[serde(rename = "created_at")]
28 pub created_at: String,
29 #[serde(rename = "creator", deserialize_with = "Option::deserialize")]
30 pub creator: Option<Box<models::User1>>,
31 #[serde(rename = "id")]
33 pub id: i32,
34 #[serde(rename = "node_id")]
35 pub node_id: String,
36 #[serde(rename = "note", deserialize_with = "Option::deserialize")]
37 pub note: Option<String>,
38 #[serde(rename = "project_url")]
39 pub project_url: String,
40 #[serde(rename = "updated_at")]
41 pub updated_at: String,
42 #[serde(rename = "url")]
43 pub url: String,
44}
45
46impl ProjectCard {
47 pub fn new(archived: bool, column_id: Option<i32>, column_url: String, created_at: String, creator: Option<models::User1>, id: i32, node_id: String, note: Option<String>, project_url: String, updated_at: String, url: String) -> ProjectCard {
48 ProjectCard {
49 after_id: None,
50 archived,
51 column_id,
52 column_url,
53 content_url: None,
54 created_at,
55 creator: creator.map(Box::new),
56 id,
57 node_id,
58 note,
59 project_url,
60 updated_at,
61 url,
62 }
63 }
64}
65