use crate::models::{ChangeHistory, CredentialAndPurposeKey};
use minicbor::{CborLen, Decode, Encode};
use ockam_core::compat::vec::Vec;
use ockam_core::{CowBytes, Route};
#[derive(Debug, Encode, Decode, CborLen, Clone)]
#[rustfmt::skip]
pub struct SecureChannelPaddedMessage<'a> {
#[b(0)] pub message: SecureChannelMessage<'a>,
#[b(1)] pub padding: CowBytes<'a>,
}
#[derive(Debug, Encode, Decode, CborLen, Clone)]
#[rustfmt::skip]
pub enum SecureChannelMessage<'a> {
#[b(0)] Payload(#[b(0)] PlaintextPayloadMessage<'a>),
#[n(1)] RefreshCredentials(#[n(0)] RefreshCredentialsMessage),
#[n(2)] Close,
}
#[derive(Debug, Encode, Decode, CborLen, Clone)]
#[rustfmt::skip]
pub struct PlaintextPayloadMessage<'a> {
#[n(0)] pub onward_route: Route,
#[n(1)] pub return_route: Route,
#[b(2)] pub payload: CowBytes<'a>,
}
#[derive(Debug, Encode, Decode, CborLen, Clone)]
#[rustfmt::skip]
pub struct RefreshCredentialsMessage {
#[n(0)] pub change_history: ChangeHistory,
#[n(1)] pub credentials: Vec<CredentialAndPurposeKey>,
}