harbor_api/models/scan_data_export_request.rs
1/*
2 * Harbor API
3 *
4 * These APIs provide services for manipulating Harbor project.
5 *
6 * The version of the OpenAPI document: 2.0
7 *
8 * Generated by: https://openapi-generator.tech
9 */
10
11use crate::models;
12use serde::{Deserialize, Serialize};
13
14/// ScanDataExportRequest : The criteria to select the scan data to export.
15#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
16pub struct ScanDataExportRequest {
17 /// Name of the scan data export job
18 #[serde(rename = "job_name", skip_serializing_if = "Option::is_none")]
19 pub job_name: Option<String>,
20 /// A list of one or more projects for which to export the scan data, currently only one project is supported due to performance concerns, but define as array for extension in the future.
21 #[serde(rename = "projects", skip_serializing_if = "Option::is_none")]
22 pub projects: Option<Vec<i64>>,
23 /// A list of one or more labels for which to export the scan data, defaults to all if empty
24 #[serde(rename = "labels", skip_serializing_if = "Option::is_none")]
25 pub labels: Option<Vec<i64>>,
26 /// A list of repositories for which to export the scan data, defaults to all if empty
27 #[serde(rename = "repositories", skip_serializing_if = "Option::is_none")]
28 pub repositories: Option<String>,
29 /// CVE-IDs for which to export data. Multiple CVE-IDs can be specified by separating using ',' and enclosed between '{}'. Defaults to all if empty
30 #[serde(rename = "cveIds", skip_serializing_if = "Option::is_none")]
31 pub cve_ids: Option<String>,
32 /// A list of tags enclosed within '{}'. Defaults to all if empty
33 #[serde(rename = "tags", skip_serializing_if = "Option::is_none")]
34 pub tags: Option<String>,
35}
36
37impl ScanDataExportRequest {
38 /// The criteria to select the scan data to export.
39 pub fn new() -> ScanDataExportRequest {
40 ScanDataExportRequest {
41 job_name: None,
42 projects: None,
43 labels: None,
44 repositories: None,
45 cve_ids: None,
46 tags: None,
47 }
48 }
49}
50