harbor_api/models/
scanner_registration.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/// ScannerRegistration : Registration represents a named configuration for invoking a scanner via its adapter. 
15#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
16pub struct ScannerRegistration {
17    /// The unique identifier of this registration.
18    #[serde(rename = "uuid", skip_serializing_if = "Option::is_none")]
19    pub uuid: Option<String>,
20    /// The name of this registration.
21    #[serde(rename = "name", skip_serializing_if = "Option::is_none")]
22    pub name: Option<String>,
23    /// An optional description of this registration.
24    #[serde(rename = "description", skip_serializing_if = "Option::is_none")]
25    pub description: Option<String>,
26    /// A base URL of the scanner adapter
27    #[serde(rename = "url", skip_serializing_if = "Option::is_none")]
28    pub url: Option<String>,
29    /// Indicate whether the registration is enabled or not
30    #[serde(rename = "disabled", skip_serializing_if = "Option::is_none")]
31    pub disabled: Option<bool>,
32    /// Indicate if the registration is set as the system default one
33    #[serde(rename = "is_default", skip_serializing_if = "Option::is_none")]
34    pub is_default: Option<bool>,
35    /// Specify what authentication approach is adopted for the HTTP communications. Supported types Basic\", \"Bearer\" and api key header \"X-ScannerAdapter-API-Key\" 
36    #[serde(rename = "auth", skip_serializing_if = "Option::is_none")]
37    pub auth: Option<String>,
38    /// An optional value of the HTTP Authorization header sent with each request to the Scanner Adapter API. 
39    #[serde(rename = "access_credential", skip_serializing_if = "Option::is_none")]
40    pub access_credential: Option<String>,
41    /// Indicate if skip the certificate verification when sending HTTP requests
42    #[serde(rename = "skip_certVerify", skip_serializing_if = "Option::is_none")]
43    pub skip_cert_verify: Option<bool>,
44    /// Indicate whether use internal registry addr for the scanner to pull content or not
45    #[serde(rename = "use_internal_addr", skip_serializing_if = "Option::is_none")]
46    pub use_internal_addr: Option<bool>,
47    /// The creation time of this registration
48    #[serde(rename = "create_time", skip_serializing_if = "Option::is_none")]
49    pub create_time: Option<String>,
50    /// The update time of this registration
51    #[serde(rename = "update_time", skip_serializing_if = "Option::is_none")]
52    pub update_time: Option<String>,
53    /// Optional property to describe the name of the scanner registration
54    #[serde(rename = "adapter", skip_serializing_if = "Option::is_none")]
55    pub adapter: Option<String>,
56    /// Optional property to describe the vendor of the scanner registration
57    #[serde(rename = "vendor", skip_serializing_if = "Option::is_none")]
58    pub vendor: Option<String>,
59    /// Optional property to describe the version of the scanner registration
60    #[serde(rename = "version", skip_serializing_if = "Option::is_none")]
61    pub version: Option<String>,
62    /// Indicate the healthy of the registration
63    #[serde(rename = "health", skip_serializing_if = "Option::is_none")]
64    pub health: Option<String>,
65    /// Indicates the capabilities of the scanner, e.g. support_vulnerability or support_sbom.
66    #[serde(rename = "capabilities", skip_serializing_if = "Option::is_none")]
67    pub capabilities: Option<std::collections::HashMap<String, serde_json::Value>>,
68}
69
70impl ScannerRegistration {
71    /// Registration represents a named configuration for invoking a scanner via its adapter. 
72    pub fn new() -> ScannerRegistration {
73        ScannerRegistration {
74            uuid: None,
75            name: None,
76            description: None,
77            url: None,
78            disabled: None,
79            is_default: None,
80            auth: None,
81            access_credential: None,
82            skip_cert_verify: None,
83            use_internal_addr: None,
84            create_time: None,
85            update_time: None,
86            adapter: None,
87            vendor: None,
88            version: None,
89            health: None,
90            capabilities: None,
91        }
92    }
93}
94