artifact-keeper-client 1.2.1

Rust client for the Artifact Keeper REST API
Documentation
/*
 * Artifact Keeper API
 *
 * Enterprise artifact registry supporting 45+ package formats.
 *
 * The version of the OpenAPI document: 1.2.1
 * 
 * Generated by: https://openapi-generator.tech
 */

use crate::models;
use serde::{Deserialize, Serialize};

#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct UpstreamAuthRequest {
    /// Auth type: \"basic\", \"bearer\", or \"none\" to remove.
    #[serde(rename = "auth_type")]
    pub auth_type: String,
    /// Password (basic) or token (bearer). Write-only, never returned.
    #[serde(rename = "password", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
    pub password: Option<Option<String>>,
    /// Username for basic auth.
    #[serde(rename = "username", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
    pub username: Option<Option<String>>,
}

impl UpstreamAuthRequest {
    pub fn new(auth_type: String) -> UpstreamAuthRequest {
        UpstreamAuthRequest {
            auth_type,
            password: None,
            username: None,
        }
    }
}