harbor-api 2.0.0

These APIs provide services for manipulating Harbor project.
Documentation
/*
 * Harbor API
 *
 * These APIs provide services for manipulating Harbor project.
 *
 * The version of the OpenAPI document: 2.0
 * 
 * Generated by: https://openapi-generator.tech
 */

use crate::models;
use serde::{Deserialize, Serialize};

/// ScannerRegistration : Registration represents a named configuration for invoking a scanner via its adapter. 
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct ScannerRegistration {
    /// The unique identifier of this registration.
    #[serde(rename = "uuid", skip_serializing_if = "Option::is_none")]
    pub uuid: Option<String>,
    /// The name of this registration.
    #[serde(rename = "name", skip_serializing_if = "Option::is_none")]
    pub name: Option<String>,
    /// An optional description of this registration.
    #[serde(rename = "description", skip_serializing_if = "Option::is_none")]
    pub description: Option<String>,
    /// A base URL of the scanner adapter
    #[serde(rename = "url", skip_serializing_if = "Option::is_none")]
    pub url: Option<String>,
    /// Indicate whether the registration is enabled or not
    #[serde(rename = "disabled", skip_serializing_if = "Option::is_none")]
    pub disabled: Option<bool>,
    /// Indicate if the registration is set as the system default one
    #[serde(rename = "is_default", skip_serializing_if = "Option::is_none")]
    pub is_default: Option<bool>,
    /// Specify what authentication approach is adopted for the HTTP communications. Supported types Basic\", \"Bearer\" and api key header \"X-ScannerAdapter-API-Key\" 
    #[serde(rename = "auth", skip_serializing_if = "Option::is_none")]
    pub auth: Option<String>,
    /// An optional value of the HTTP Authorization header sent with each request to the Scanner Adapter API. 
    #[serde(rename = "access_credential", skip_serializing_if = "Option::is_none")]
    pub access_credential: Option<String>,
    /// Indicate if skip the certificate verification when sending HTTP requests
    #[serde(rename = "skip_certVerify", skip_serializing_if = "Option::is_none")]
    pub skip_cert_verify: Option<bool>,
    /// Indicate whether use internal registry addr for the scanner to pull content or not
    #[serde(rename = "use_internal_addr", skip_serializing_if = "Option::is_none")]
    pub use_internal_addr: Option<bool>,
    /// The creation time of this registration
    #[serde(rename = "create_time", skip_serializing_if = "Option::is_none")]
    pub create_time: Option<String>,
    /// The update time of this registration
    #[serde(rename = "update_time", skip_serializing_if = "Option::is_none")]
    pub update_time: Option<String>,
    /// Optional property to describe the name of the scanner registration
    #[serde(rename = "adapter", skip_serializing_if = "Option::is_none")]
    pub adapter: Option<String>,
    /// Optional property to describe the vendor of the scanner registration
    #[serde(rename = "vendor", skip_serializing_if = "Option::is_none")]
    pub vendor: Option<String>,
    /// Optional property to describe the version of the scanner registration
    #[serde(rename = "version", skip_serializing_if = "Option::is_none")]
    pub version: Option<String>,
    /// Indicate the healthy of the registration
    #[serde(rename = "health", skip_serializing_if = "Option::is_none")]
    pub health: Option<String>,
    /// Indicates the capabilities of the scanner, e.g. support_vulnerability or support_sbom.
    #[serde(rename = "capabilities", skip_serializing_if = "Option::is_none")]
    pub capabilities: Option<std::collections::HashMap<String, serde_json::Value>>,
}

impl ScannerRegistration {
    /// Registration represents a named configuration for invoking a scanner via its adapter. 
    pub fn new() -> ScannerRegistration {
        ScannerRegistration {
            uuid: None,
            name: None,
            description: None,
            url: None,
            disabled: None,
            is_default: None,
            auth: None,
            access_credential: None,
            skip_cert_verify: None,
            use_internal_addr: None,
            create_time: None,
            update_time: None,
            adapter: None,
            vendor: None,
            version: None,
            health: None,
            capabilities: None,
        }
    }
}