openapi_github/models/
discussion_category.rs

1/*
2 * GitHub's official OpenAPI spec + Octokit extension
3 *
4 * OpenAPI specs from https://github.com/github/rest-api-description with the 'x-octokit' extension required by the Octokit SDKs
5 *
6 * The version of the OpenAPI document: 16.6.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 DiscussionCategory {
16    #[serde(rename = "created_at")]
17    pub created_at: String,
18    #[serde(rename = "description")]
19    pub description: String,
20    #[serde(rename = "emoji")]
21    pub emoji: String,
22    #[serde(rename = "id")]
23    pub id: i32,
24    #[serde(rename = "is_answerable")]
25    pub is_answerable: bool,
26    #[serde(rename = "name")]
27    pub name: String,
28    #[serde(rename = "node_id", skip_serializing_if = "Option::is_none")]
29    pub node_id: Option<String>,
30    #[serde(rename = "repository_id")]
31    pub repository_id: i32,
32    #[serde(rename = "slug")]
33    pub slug: String,
34    #[serde(rename = "updated_at")]
35    pub updated_at: String,
36}
37
38impl DiscussionCategory {
39    pub fn new(created_at: String, description: String, emoji: String, id: i32, is_answerable: bool, name: String, repository_id: i32, slug: String, updated_at: String) -> DiscussionCategory {
40        DiscussionCategory {
41            created_at,
42            description,
43            emoji,
44            id,
45            is_answerable,
46            name,
47            node_id: None,
48            repository_id,
49            slug,
50            updated_at,
51        }
52    }
53}
54