harbor_api/models/
scanner_registration_settings.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#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
15pub struct ScannerRegistrationSettings {
16    /// The name of this registration
17    #[serde(rename = "name")]
18    pub name: String,
19    /// A base URL of the scanner adapter.
20    #[serde(rename = "url")]
21    pub url: String,
22    /// Specify what authentication approach is adopted for the HTTP communications. Supported types Basic\", \"Bearer\" and api key header \"X-ScannerAdapter-API-Key\" 
23    #[serde(rename = "auth", skip_serializing_if = "Option::is_none")]
24    pub auth: Option<String>,
25    /// An optional value of the HTTP Authorization header sent with each request to the Scanner Adapter API. 
26    #[serde(rename = "access_credential", skip_serializing_if = "Option::is_none")]
27    pub access_credential: Option<String>,
28}
29
30impl ScannerRegistrationSettings {
31    pub fn new(name: String, url: String) -> ScannerRegistrationSettings {
32        ScannerRegistrationSettings {
33            name,
34            url,
35            auth: None,
36            access_credential: None,
37        }
38    }
39}
40