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};

#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct ScannerRegistrationSettings {
    /// The name of this registration
    #[serde(rename = "name")]
    pub name: String,
    /// A base URL of the scanner adapter.
    #[serde(rename = "url")]
    pub url: String,
    /// 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>,
}

impl ScannerRegistrationSettings {
    pub fn new(name: String, url: String) -> ScannerRegistrationSettings {
        ScannerRegistrationSettings {
            name,
            url,
            auth: None,
            access_credential: None,
        }
    }
}