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