openapi_github/models/
global_advisory_identifiers_inner.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 GlobalAdvisoryIdentifiersInner {
16    /// The type of identifier.
17    #[serde(rename = "type")]
18    pub r#type: Type,
19    /// The identifier value.
20    #[serde(rename = "value")]
21    pub value: String,
22}
23
24impl GlobalAdvisoryIdentifiersInner {
25    pub fn new(r#type: Type, value: String) -> GlobalAdvisoryIdentifiersInner {
26        GlobalAdvisoryIdentifiersInner {
27            r#type,
28            value,
29        }
30    }
31}
32/// The type of identifier.
33#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
34pub enum Type {
35    #[serde(rename = "CVE")]
36    Cve,
37    #[serde(rename = "GHSA")]
38    Ghsa,
39}
40
41impl Default for Type {
42    fn default() -> Type {
43        Self::Cve
44    }
45}
46