/*
 * Artifact Keeper API
 *
 * REST API for Artifact Keeper, an open-source universal artifact registry. Covers user management, repositories, artifacts, search, security scanning, SBOM, dependency tracking, SSO, analytics, monitoring, telemetry, lifecycle policies, plugins, edge nodes, migration, and administration. Format-specific protocol endpoints (npm, PyPI, Maven, Docker/OCI, etc.) are not included; those follow their respective upstream specifications.
 *
 * The version of the OpenAPI document: 1.0.0-a2
 * 
 * Generated by: https://openapi-generator.tech
 */

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

#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct VerifyArtifact200ResponseSignaturesInner {
    #[serde(rename = "signature_id")]
    pub signature_id: uuid::Uuid,
    #[serde(rename = "key_id")]
    pub key_id: uuid::Uuid,
    #[serde(rename = "valid")]
    pub valid: bool,
    #[serde(rename = "reason", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
    pub reason: Option<Option<String>>,
}

impl VerifyArtifact200ResponseSignaturesInner {
    pub fn new(signature_id: uuid::Uuid, key_id: uuid::Uuid, valid: bool) -> VerifyArtifact200ResponseSignaturesInner {
        VerifyArtifact200ResponseSignaturesInner {
            signature_id,
            key_id,
            valid,
            reason: None,
        }
    }
}

