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

/// RotateWebhookSecretResponse : Response returned by the rotate-secret endpoint.
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct RotateWebhookSecretResponse {
    #[serde(rename = "id")]
    pub id: uuid::Uuid,
    /// When the previously active secret stops being accepted.
    #[serde(rename = "previous_secret_expires_at")]
    pub previous_secret_expires_at: String,
    /// Raw signing secret produced by this rotation. Shown exactly once.
    #[serde(rename = "secret")]
    pub secret: String,
    #[serde(rename = "secret_digest")]
    pub secret_digest: String,
}

impl RotateWebhookSecretResponse {
    /// Response returned by the rotate-secret endpoint.
    pub fn new(id: uuid::Uuid, previous_secret_expires_at: String, secret: String, secret_digest: String) -> RotateWebhookSecretResponse {
        RotateWebhookSecretResponse {
            id,
            previous_secret_expires_at,
            secret,
            secret_digest,
        }
    }
}