use crate::model::artifacts::ArtifactChecksumRecord;
use std::fmt;
#[derive(Clone)]
pub enum IcSnapshotUploadAttribution {
Applied {
snapshot_id: Vec<u8>,
attribution: ArtifactChecksumRecord,
},
NotApplied {
exclusion: ArtifactChecksumRecord,
},
Unresolved {
uncertainty: ArtifactChecksumRecord,
},
}
impl fmt::Debug for IcSnapshotUploadAttribution {
fn fmt(&self, formatter: &mut fmt::Formatter<'_>) -> fmt::Result {
match self {
Self::Applied {
snapshot_id,
attribution,
} => formatter
.debug_struct("Applied")
.field("snapshot_id_bytes", &snapshot_id.len())
.field("attribution", attribution)
.finish(),
Self::NotApplied { exclusion } => formatter
.debug_struct("NotApplied")
.field("exclusion", exclusion)
.finish(),
Self::Unresolved { uncertainty } => formatter
.debug_struct("Unresolved")
.field("uncertainty", uncertainty)
.finish(),
}
}
}
#[derive(Clone, Debug)]
pub struct IcSnapshotUploadSettlement {
pub authority: ArtifactChecksumRecord,
pub mutation_attempt: u32,
pub observation_attempt: u32,
pub challenge: ArtifactChecksumRecord,
pub baseline: ArtifactChecksumRecord,
pub inventory: ArtifactChecksumRecord,
pub observation_evidence: ArtifactChecksumRecord,
pub attribution: IcSnapshotUploadAttribution,
pub evidence: ArtifactChecksumRecord,
}