authentik_rust/models/
docker_service_connection_request.rs

1/*
2 * authentik
3 *
4 * Making authentication simple.
5 *
6 * The version of the OpenAPI document: 2024.2.1
7 * Contact: hello@goauthentik.io
8 * Generated by: https://openapi-generator.tech
9 */
10
11use crate::models;
12
13/// DockerServiceConnectionRequest : DockerServiceConnection Serializer
14#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
15pub struct DockerServiceConnectionRequest {
16    #[serde(rename = "name")]
17    pub name: String,
18    /// If enabled, use the local connection. Required Docker socket/Kubernetes Integration
19    #[serde(rename = "local", skip_serializing_if = "Option::is_none")]
20    pub local: Option<bool>,
21    /// Can be in the format of 'unix://<path>' when connecting to a local docker daemon, or 'https://<hostname>:2376' when connecting to a remote system.
22    #[serde(rename = "url")]
23    pub url: String,
24    /// CA which the endpoint's Certificate is verified against. Can be left empty for no validation.
25    #[serde(rename = "tls_verification", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
26    pub tls_verification: Option<Option<uuid::Uuid>>,
27    /// Certificate/Key used for authentication. Can be left empty for no authentication.
28    #[serde(rename = "tls_authentication", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
29    pub tls_authentication: Option<Option<uuid::Uuid>>,
30}
31
32impl DockerServiceConnectionRequest {
33    /// DockerServiceConnection Serializer
34    pub fn new(name: String, url: String) -> DockerServiceConnectionRequest {
35        DockerServiceConnectionRequest {
36            name,
37            local: None,
38            url,
39            tls_verification: None,
40            tls_authentication: None,
41        }
42    }
43}
44