tf-types 0.1.6

Core semantic types, traits, and schemas powering the TrustForge protocol.
Documentation
// GENERATED by `tf-schema codegen --target rust` — DO NOT EDIT BY HAND.

#![allow(unused_imports, non_camel_case_types, non_snake_case, clippy::all)]

use serde::{Deserialize, Serialize};
use super::*;

/// A signed response to an ApprovalRequest.
#[derive(Clone, Debug, PartialEq, Eq, Serialize, Deserialize)]
pub struct ApprovalResponse {
    /// Version of the approval-response schema itself.
    pub response_version: ApprovalResponse_ResponseVersion,
    /// Identifier of the ApprovalRequest this responds to.
    pub request_id: String,
    /// The human's decision.
    pub decision: ApprovalResponse_Decision,
    /// Actor that signed this response.
    pub responder: ActorId,
    /// Optional free-text note from the responder.
    #[serde(skip_serializing_if = "Option::is_none", default)]
    pub note: Option<String>,
    /// When the response was signed.
    pub signed_at: Timestamp,
    /// Signature envelope over the canonical form of this response with signature.signature cleared.
    pub signature: SignatureEnvelope,
}

/// The human's decision.
#[derive(Clone, Debug, PartialEq, Eq, Serialize, Deserialize)]
pub enum ApprovalResponse_Decision {
    #[serde(rename = "approve")]
    Approve,
    #[serde(rename = "deny")]
    Deny,
}

/// Version of the approval-response schema itself.
#[derive(Clone, Debug, PartialEq, Eq, Serialize, Deserialize)]
pub enum ApprovalResponse_ResponseVersion {
    #[serde(rename = "1")]
    V1,
}