1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
/*
* 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,
}
}
}