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};

/// CreateRepoTokenResponse : Response returned when a repository token is created. The `token` field contains the plaintext value and is only shown once.
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct CreateRepoTokenResponse {
    #[serde(rename = "id")]
    pub id: uuid::Uuid,
    #[serde(rename = "name")]
    pub name: String,
    #[serde(rename = "repository_key")]
    pub repository_key: String,
    /// The full token value (only returned at creation time).
    #[serde(rename = "token")]
    pub token: String,
}

impl CreateRepoTokenResponse {
    /// Response returned when a repository token is created. The `token` field contains the plaintext value and is only shown once.
    pub fn new(id: uuid::Uuid, name: String, repository_key: String, token: String) -> CreateRepoTokenResponse {
        CreateRepoTokenResponse {
            id,
            name,
            repository_key,
            token,
        }
    }
}