use super::*;
#[derive(Clone, Data, Debug, Default, Deserialize, Eq, New, PartialEq, Serialize)]
pub struct BlobArtifact {
pub(crate) module_id: String,
pub(crate) version: String,
pub(crate) sha256: String,
#[get(type(copy))]
pub(crate) size_bytes: u64,
#[get(type(copy))]
pub(crate) kind: ArtifactKind,
#[new(skip)]
#[serde(default)]
pub(crate) interface_id: String,
#[new(skip)]
#[serde(default)]
#[get(type(copy))]
pub(crate) interface_version: u32,
#[new(skip)]
#[serde(default)]
#[get(type(copy))]
pub(crate) state_schema_version: u32,
#[new(skip)]
#[serde(default)]
#[get(type(copy))]
pub(crate) min_host_abi: u32,
#[new(skip)]
#[serde(default)]
#[get(type(copy))]
pub(crate) max_host_abi: u32,
#[new(skip)]
#[serde(default)]
pub(crate) required_capabilities: Vec<String>,
#[new(skip)]
#[serde(default)]
pub(crate) entrypoint: String,
#[new(skip)]
#[serde(default)]
pub(crate) dependencies: Vec<String>,
}
#[derive(Clone, Data, Debug, Default, Deserialize, Eq, New, PartialEq, Serialize)]
pub struct RouteManifest {
pub(crate) route: String,
pub(crate) entry_module: String,
#[new(skip)]
#[serde(default)]
pub(crate) slot_bindings: BTreeMap<String, String>,
#[new(skip)]
#[serde(default)]
pub(crate) transitive_hashes: BTreeSet<String>,
}
#[derive(Clone, Data, Debug, Default, Deserialize, Eq, New, PartialEq, Serialize)]
pub struct ReleaseManifest {
#[get(type(copy))]
pub(crate) manifest_schema: u32,
pub(crate) project: String,
pub(crate) channel: String,
pub(crate) track: String,
#[get(type(copy))]
pub(crate) release_seq: u64,
#[new(skip)]
#[serde(default)]
#[get(skip)]
pub(crate) rollback_of: Option<u64>,
#[get(type(copy))]
pub(crate) delivery_mode: DeliveryChannelMode,
#[new(skip)]
#[get(type(copy))]
pub(crate) min_host_abi: u32,
#[new(skip)]
#[get(type(copy))]
pub(crate) max_host_abi: u32,
#[new(skip)]
#[serde(default)]
pub(crate) required_capabilities: Vec<String>,
#[new(skip)]
#[serde(default)]
pub(crate) artifacts: BTreeMap<String, BlobArtifact>,
#[new(skip)]
#[serde(default)]
pub(crate) routes: BTreeMap<String, RouteManifest>,
#[new(skip)]
#[serde(default)]
#[get(type(copy))]
pub(crate) created_at_unix: u64,
#[new(skip)]
#[serde(default)]
pub(crate) signature: String,
}
#[derive(Clone, Data, Debug, Default, Deserialize, Eq, New, PartialEq, Serialize)]
pub struct ReleaseActivatedEvent {
#[get(type(copy))]
pub(crate) event_schema: u32,
pub(crate) project: String,
pub(crate) channel: String,
pub(crate) track: String,
#[get(type(copy))]
pub(crate) from_release: u64,
#[get(type(copy))]
pub(crate) to_release: u64,
#[new(skip)]
#[serde(default)]
pub(crate) affected_routes: Vec<String>,
pub(crate) manifest_sha256: String,
}
#[derive(Clone, Data, Debug, Default, Deserialize, Eq, New, PartialEq, Serialize)]
pub struct ClientNegotiation {
#[get(type(copy))]
pub(crate) protocol_version: u32,
#[get(type(copy))]
pub(crate) host_abi: u32,
#[get(type(copy))]
pub(crate) delivery_mode: DeliveryChannelMode,
#[new(skip)]
#[serde(default)]
pub(crate) capabilities: Vec<String>,
#[new(skip)]
#[serde(default)]
#[get(skip)]
pub(crate) preferred_track: Option<String>,
}