openapi_github/models/
dependency_graph_spdx_sbom_sbom.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 DependencyGraphSpdxSbomSbom {
16    /// The SPDX identifier for the SPDX document.
17    #[serde(rename = "SPDXID")]
18    pub spdxid: String,
19    /// The version of the SPDX specification that this document conforms to.
20    #[serde(rename = "spdxVersion")]
21    pub spdx_version: String,
22    #[serde(rename = "creationInfo")]
23    pub creation_info: Box<models::DependencyGraphSpdxSbomSbomCreationInfo>,
24    /// The name of the SPDX document.
25    #[serde(rename = "name")]
26    pub name: String,
27    /// The license under which the SPDX document is licensed.
28    #[serde(rename = "dataLicense")]
29    pub data_license: String,
30    /// The name of the repository that the SPDX document describes.
31    #[serde(rename = "documentDescribes")]
32    pub document_describes: Vec<String>,
33    /// The namespace for the SPDX document.
34    #[serde(rename = "documentNamespace")]
35    pub document_namespace: String,
36    #[serde(rename = "packages")]
37    pub packages: Vec<models::DependencyGraphSpdxSbomSbomPackagesInner>,
38}
39
40impl DependencyGraphSpdxSbomSbom {
41    pub fn new(spdxid: String, spdx_version: String, creation_info: models::DependencyGraphSpdxSbomSbomCreationInfo, name: String, data_license: String, document_describes: Vec<String>, document_namespace: String, packages: Vec<models::DependencyGraphSpdxSbomSbomPackagesInner>) -> DependencyGraphSpdxSbomSbom {
42        DependencyGraphSpdxSbomSbom {
43            spdxid,
44            spdx_version,
45            creation_info: Box::new(creation_info),
46            name,
47            data_license,
48            document_describes,
49            document_namespace,
50            packages,
51        }
52    }
53}
54