Skip to main content

windmill_api/models/
deployment_request_comment.rs

1/*
2 * Windmill API
3 *
4 * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
5 *
6 * The version of the OpenAPI document: 1.683.1
7 * Contact: contact@windmill.dev
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 DeploymentRequestComment {
16    #[serde(rename = "id")]
17    pub id: i64,
18    #[serde(rename = "parent_id", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
19    pub parent_id: Option<Option<i64>>,
20    #[serde(rename = "author")]
21    pub author: String,
22    #[serde(rename = "author_email")]
23    pub author_email: String,
24    #[serde(rename = "body")]
25    pub body: String,
26    #[serde(rename = "anchor_kind", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
27    pub anchor_kind: Option<Option<String>>,
28    #[serde(rename = "anchor_path", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
29    pub anchor_path: Option<Option<String>>,
30    #[serde(rename = "obsolete")]
31    pub obsolete: bool,
32    #[serde(rename = "created_at")]
33    pub created_at: String,
34}
35
36impl DeploymentRequestComment {
37    pub fn new(id: i64, author: String, author_email: String, body: String, obsolete: bool, created_at: String) -> DeploymentRequestComment {
38        DeploymentRequestComment {
39            id,
40            parent_id: None,
41            author,
42            author_email,
43            body,
44            anchor_kind: None,
45            anchor_path: None,
46            obsolete,
47            created_at,
48        }
49    }
50}
51