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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
/*
* 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 ScannerRegistrationReq {
/// The name of this registration
#[serde(rename = "name")]
pub name: 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")]
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>,
/// 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>,
/// Indicate whether the registration is enabled or not
#[serde(rename = "disabled", skip_serializing_if = "Option::is_none")]
pub disabled: Option<bool>,
}
impl ScannerRegistrationReq {
pub fn new(name: String, url: String) -> ScannerRegistrationReq {
ScannerRegistrationReq {
name,
description: None,
url,
auth: None,
access_credential: None,
skip_cert_verify: None,
use_internal_addr: None,
disabled: None,
}
}
}