openapi_github/models/
code_of_conduct_simple.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/// CodeOfConductSimple : Code of Conduct Simple
15#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
16pub struct CodeOfConductSimple {
17    #[serde(rename = "url")]
18    pub url: String,
19    #[serde(rename = "key")]
20    pub key: String,
21    #[serde(rename = "name")]
22    pub name: String,
23    #[serde(rename = "html_url", deserialize_with = "Option::deserialize")]
24    pub html_url: Option<String>,
25}
26
27impl CodeOfConductSimple {
28    /// Code of Conduct Simple
29    pub fn new(url: String, key: String, name: String, html_url: Option<String>) -> CodeOfConductSimple {
30        CodeOfConductSimple {
31            url,
32            key,
33            name,
34            html_url,
35        }
36    }
37}
38