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
/*
* 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,
}
}
}