openapi_github/models/
dependabot_alert_with_repository_dependency.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/// DependabotAlertWithRepositoryDependency : Details for the vulnerable dependency.
15#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
16pub struct DependabotAlertWithRepositoryDependency {
17    #[serde(rename = "package", skip_serializing_if = "Option::is_none")]
18    pub package: Option<Box<models::DependabotAlertPackage>>,
19    /// The full path to the dependency manifest file, relative to the root of the repository.
20    #[serde(rename = "manifest_path", skip_serializing_if = "Option::is_none")]
21    pub manifest_path: Option<String>,
22    /// The execution scope of the vulnerable dependency.
23    #[serde(rename = "scope", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
24    pub scope: Option<Option<Scope>>,
25}
26
27impl DependabotAlertWithRepositoryDependency {
28    /// Details for the vulnerable dependency.
29    pub fn new() -> DependabotAlertWithRepositoryDependency {
30        DependabotAlertWithRepositoryDependency {
31            package: None,
32            manifest_path: None,
33            scope: None,
34        }
35    }
36}
37/// The execution scope of the vulnerable dependency.
38#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
39pub enum Scope {
40    #[serde(rename = "development")]
41    Development,
42    #[serde(rename = "runtime")]
43    Runtime,
44}
45
46impl Default for Scope {
47    fn default() -> Scope {
48        Self::Development
49    }
50}
51