gitea-rs/crates/gitea-client/src/models/comment.rs

60 lines
2.0 KiB
Rust
Raw Normal View History

/*
* Gitea API
*
* This documentation describes the Gitea API.
*
* The version of the OpenAPI document: 1.22.1
*
* Generated by: https://openapi-generator.tech
*/
use crate::models;
use serde::{Deserialize, Serialize};
/// Comment : Comment represents a comment on a commit or issue
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct Comment {
#[serde(rename = "assets", skip_serializing_if = "Option::is_none")]
pub assets: Option<Vec<models::Attachment>>,
#[serde(rename = "body", skip_serializing_if = "Option::is_none")]
pub body: Option<String>,
#[serde(rename = "created_at", skip_serializing_if = "Option::is_none")]
pub created_at: Option<String>,
#[serde(rename = "html_url", skip_serializing_if = "Option::is_none")]
pub html_url: Option<String>,
#[serde(rename = "id", skip_serializing_if = "Option::is_none")]
pub id: Option<i64>,
#[serde(rename = "issue_url", skip_serializing_if = "Option::is_none")]
pub issue_url: Option<String>,
#[serde(rename = "original_author", skip_serializing_if = "Option::is_none")]
pub original_author: Option<String>,
#[serde(rename = "original_author_id", skip_serializing_if = "Option::is_none")]
pub original_author_id: Option<i64>,
#[serde(rename = "pull_request_url", skip_serializing_if = "Option::is_none")]
pub pull_request_url: Option<String>,
#[serde(rename = "updated_at", skip_serializing_if = "Option::is_none")]
pub updated_at: Option<String>,
#[serde(rename = "user", skip_serializing_if = "Option::is_none")]
pub user: Option<Box<models::User>>,
}
impl Comment {
/// Comment represents a comment on a commit or issue
pub fn new() -> Comment {
Comment {
assets: None,
body: None,
created_at: None,
html_url: None,
id: None,
issue_url: None,
original_author: None,
original_author_id: None,
pull_request_url: None,
updated_at: None,
user: None,
}
}
}