#[derive(Clone, PartialEq, Message)]
#[derive(Eq, Serialize, Deserialize)]
pub struct Host {
#[prost(oneof="host::HostId", tags="1, 2, 3")]
pub host_id: ::std::option::Option<host::HostId>,
}
pub mod host {
#[derive(Clone, Oneof, PartialEq)]
#[derive(Eq, Serialize, Deserialize)]
pub enum HostId {
#[prost(string, tag="1")]
Hostname(String),
#[prost(string, tag="2")]
Ip(String),
#[prost(string, tag="3")]
AssetId(String),
}
}
#[derive(Clone, PartialEq, Message)]
#[derive(Eq, Serialize, Deserialize)]
#[derive(Builder)]
#[builder(setter(into))]
pub struct AssetDescription {
#[prost(string, tag="1")]
#[builder(field(private))]
#[builder(default = "::uuid::Uuid::new_v4().to_string()")]
pub node_key: String,
#[prost(uint64, tag="2")]
pub timestamp: u64,
#[prost(message, optional, tag="3")]
#[builder(default)]
pub asset_id: ::std::option::Option<::std::string::String>,
#[prost(message, optional, tag="4")]
#[builder(default)]
pub host_name: ::std::option::Option<::std::string::String>,
#[prost(message, optional, tag="5")]
#[builder(default)]
pub host_domain: ::std::option::Option<::std::string::String>,
#[prost(message, optional, tag="6")]
#[builder(default)]
pub host_fqdn: ::std::option::Option<::std::string::String>,
#[prost(message, optional, tag="7")]
#[builder(default)]
pub host_local_mac: ::std::option::Option<::std::string::String>,
#[prost(message, optional, tag="8")]
#[builder(default)]
pub host_ip: ::std::option::Option<::std::string::String>,
#[prost(string, tag="9")]
#[builder(default)]
pub operating_system: String,
}
#[derive(Clone, PartialEq, Message)]
#[derive(Eq, Serialize, Deserialize)]
pub struct NodeDescription {
#[prost(oneof="node_description::WhichNode", tags="1, 2, 3, 4, 5, 6, 7")]
pub which_node: ::std::option::Option<node_description::WhichNode>,
}
pub mod node_description {
#[derive(Clone, Oneof, PartialEq)]
#[derive(Eq, Serialize, Deserialize)]
pub enum WhichNode {
#[prost(message, tag="1")]
AssetNode(super::AssetDescription),
#[prost(message, tag="2")]
ProcessNode(super::ProcessDescription),
#[prost(message, tag="3")]
FileNode(super::FileDescription),
#[prost(message, tag="4")]
IpAddressNode(super::IpAddressDescription),
#[prost(message, tag="5")]
OutboundConnectionNode(super::OutboundConnection),
#[prost(message, tag="6")]
InboundConnectionNode(super::InboundConnection),
#[prost(message, tag="7")]
DynamicNode(super::DynamicNode),
}
}
#[derive(Clone, PartialEq, Message)]
#[derive(Eq, Serialize, Deserialize)]
#[derive(Builder)]
#[builder(setter(into))]
pub struct OutboundConnection {
#[prost(string, tag="1")]
#[builder(field(private))]
#[builder(default = "::uuid::Uuid::new_v4().to_string()")]
pub node_key: String,
#[prost(message, optional, tag="2")]
#[builder(default)]
pub asset_id: ::std::option::Option<::std::string::String>,
#[prost(message, optional, tag="3")]
#[builder(default)]
pub hostname: ::std::option::Option<::std::string::String>,
#[prost(message, optional, tag="4")]
#[builder(default)]
pub host_ip: ::std::option::Option<::std::string::String>,
#[prost(uint32, tag="5")]
pub state: u32,
#[prost(uint64, tag="6")]
#[builder(default)]
pub created_timestamp: u64,
#[prost(uint64, tag="7")]
#[builder(default)]
pub terminated_timestamp: u64,
#[prost(uint64, tag="8")]
#[builder(default)]
pub last_seen_timestamp: u64,
#[prost(uint32, tag="9")]
pub port: u32,
}
#[derive(Clone, PartialEq, Message)]
#[derive(Eq, Serialize, Deserialize)]
#[derive(Builder)]
#[builder(setter(into))]
pub struct InboundConnection {
#[prost(string, tag="1")]
#[builder(field(private))]
#[builder(default = "::uuid::Uuid::new_v4().to_string()")]
pub node_key: String,
#[prost(message, optional, tag="2")]
#[builder(default)]
pub asset_id: ::std::option::Option<::std::string::String>,
#[prost(message, optional, tag="3")]
#[builder(default)]
pub hostname: ::std::option::Option<::std::string::String>,
#[prost(message, optional, tag="4")]
#[builder(default)]
pub host_ip: ::std::option::Option<::std::string::String>,
#[prost(uint32, tag="5")]
pub state: u32,
#[prost(uint64, tag="6")]
#[builder(default)]
pub created_timestamp: u64,
#[prost(uint64, tag="7")]
#[builder(default)]
pub terminated_timestamp: u64,
#[prost(uint64, tag="8")]
#[builder(default)]
pub last_seen_timestamp: u64,
#[prost(uint32, tag="9")]
pub port: u32,
}
#[derive(Clone, PartialEq, Message)]
#[derive(Eq, Serialize, Deserialize)]
#[derive(Builder)]
#[builder(setter(into))]
pub struct ProcessDescription {
#[prost(string, tag="1")]
#[builder(field(private))]
#[builder(default = "::uuid::Uuid::new_v4().to_string()")]
pub node_key: String,
#[prost(message, optional, tag="2")]
#[builder(default)]
pub asset_id: ::std::option::Option<::std::string::String>,
#[prost(message, optional, tag="3")]
#[builder(default)]
pub hostname: ::std::option::Option<::std::string::String>,
#[prost(message, optional, tag="4")]
#[builder(default)]
pub host_ip: ::std::option::Option<::std::string::String>,
#[prost(uint32, tag="5")]
pub state: u32,
#[prost(uint64, tag="6")]
#[builder(default)]
pub process_id: u64,
#[prost(string, tag="7")]
#[builder(default)]
pub process_guid: String,
#[prost(uint64, tag="8")]
#[builder(default)]
pub created_timestamp: u64,
#[prost(uint64, tag="9")]
#[builder(default)]
pub terminated_timestamp: u64,
#[prost(uint64, tag="10")]
#[builder(default)]
pub last_seen_timestamp: u64,
#[prost(string, tag="11")]
#[builder(default)]
pub process_name: String,
#[prost(string, tag="12")]
#[builder(default)]
pub process_command_line: String,
#[prost(string, tag="13")]
#[builder(default)]
pub process_integrity_level: String,
#[prost(string, tag="14")]
#[builder(default)]
pub operating_system: String,
}
#[derive(Clone, PartialEq, Message)]
#[derive(Eq, Serialize, Deserialize)]
#[derive(Builder)]
#[builder(setter(into))]
pub struct FileDescription {
#[prost(string, tag="1")]
#[builder(field(private))]
#[builder(default = "::uuid::Uuid::new_v4().to_string()")]
pub node_key: String,
#[prost(message, optional, tag="2")]
#[builder(default)]
pub asset_id: ::std::option::Option<::std::string::String>,
#[prost(message, optional, tag="3")]
#[builder(default)]
pub hostname: ::std::option::Option<::std::string::String>,
#[prost(message, optional, tag="4")]
#[builder(default)]
pub host_ip: ::std::option::Option<::std::string::String>,
#[prost(uint32, tag="5")]
pub state: u32,
#[prost(uint64, tag="6")]
#[builder(default)]
pub created_timestamp: u64,
#[prost(uint64, tag="7")]
#[builder(default)]
pub deleted_timestamp: u64,
#[prost(uint64, tag="8")]
#[builder(default)]
pub last_seen_timestamp: u64,
#[prost(string, tag="9")]
#[builder(default)]
pub file_name: String,
#[prost(string, tag="10")]
#[builder(default)]
pub file_path: String,
#[prost(string, tag="11")]
#[builder(default)]
pub file_extension: String,
#[prost(string, tag="12")]
#[builder(default)]
pub file_mime_type: String,
#[prost(uint64, tag="13")]
#[builder(default)]
pub file_size: u64,
#[prost(string, tag="14")]
#[builder(default)]
pub file_version: String,
#[prost(string, tag="15")]
#[builder(default)]
pub file_description: String,
#[prost(string, tag="16")]
#[builder(default)]
pub file_product: String,
#[prost(string, tag="17")]
#[builder(default)]
pub file_company: String,
#[prost(string, tag="18")]
#[builder(default)]
pub file_directory: String,
#[prost(uint64, tag="19")]
#[builder(default)]
pub file_inode: u64,
#[prost(uint64, tag="20")]
#[builder(default)]
pub file_hard_links: u64,
#[prost(string, tag="21")]
#[builder(default)]
pub md5_hash: String,
#[prost(string, tag="22")]
#[builder(default)]
pub sha1_hash: String,
#[prost(string, tag="23")]
#[builder(default)]
pub sha256_hash: String,
}
#[derive(Clone, PartialEq, Message)]
#[derive(Eq, Serialize, Deserialize)]
pub struct IpAddressDescription {
#[prost(string, tag="1")]
pub node_key: String,
#[prost(uint64, tag="2")]
pub timestamp: u64,
#[prost(string, tag="3")]
pub ip_address: String,
#[prost(string, tag="4")]
pub ip_proto: String,
}
#[derive(Clone, PartialEq, Message)]
#[derive(Eq, Serialize, Deserialize)]
pub struct Session {
#[prost(string, repeated, tag="1")]
pub primary_key_properties: ::std::vec::Vec<String>,
#[prost(bool, tag="2")]
pub primary_key_requires_asset_id: bool,
#[prost(uint64, tag="3")]
pub created_time: u64,
#[prost(uint64, tag="4")]
pub last_seen_time: u64,
#[prost(uint64, tag="5")]
pub terminated_time: u64,
}
#[derive(Clone, PartialEq, Message)]
#[derive(Eq, Serialize, Deserialize)]
pub struct Static {
#[prost(string, repeated, tag="1")]
pub primary_key_properties: ::std::vec::Vec<String>,
#[prost(bool, tag="2")]
pub primary_key_requires_asset_id: bool,
}
#[derive(Clone, PartialEq, Message)]
#[derive(Eq, Serialize, Deserialize)]
pub struct IdStrategy {
#[prost(oneof="id_strategy::Strategy", tags="1, 2")]
pub strategy: ::std::option::Option<id_strategy::Strategy>,
}
pub mod id_strategy {
#[derive(Clone, Oneof, PartialEq)]
#[derive(Eq, Serialize, Deserialize)]
pub enum Strategy {
#[prost(message, tag="1")]
Session(super::Session),
#[prost(message, tag="2")]
Static(super::Static),
}
}
#[derive(Clone, PartialEq, Message)]
#[derive(Eq, Serialize, Deserialize)]
pub struct RepeatedNodeStrProperty {
#[prost(string, repeated, tag="1")]
pub repeated_str: ::std::vec::Vec<String>,
}
#[derive(Clone, PartialEq, Message)]
#[derive(Eq, Serialize, Deserialize)]
pub struct RepeatedNodeIntProperty {
#[prost(uint64, repeated, tag="1")]
pub repeated_int: ::std::vec::Vec<u64>,
}
#[derive(Clone, PartialEq, Message)]
#[derive(Eq, Serialize, Deserialize)]
pub struct NodeProperty {
#[prost(oneof="node_property::Property", tags="1, 2, 3, 4, 5")]
pub property: ::std::option::Option<node_property::Property>,
}
pub mod node_property {
#[derive(Clone, Oneof, PartialEq)]
#[derive(Eq, Serialize, Deserialize)]
pub enum Property {
#[prost(int64, tag="1")]
Intprop(i64),
#[prost(uint64, tag="2")]
Uintprop(u64),
#[prost(string, tag="3")]
Strprop(String),
#[prost(message, tag="4")]
RepeatedStrProp(super::RepeatedNodeStrProperty),
#[prost(message, tag="5")]
RepeatedIntProp(super::RepeatedNodeIntProperty),
}
}
#[derive(Clone, PartialEq, Message)]
#[derive(Eq, Serialize, Deserialize)]
pub struct DynamicNode {
#[prost(map="string, message", tag="1")]
pub properties: ::std::collections::HashMap<String, NodeProperty>,
#[prost(string, tag="2")]
pub node_key: String,
#[prost(string, tag="3")]
pub node_type: String,
#[prost(uint64, tag="4")]
pub seen_at: u64,
#[prost(message, optional, tag="5")]
pub asset_id: ::std::option::Option<::std::string::String>,
#[prost(message, optional, tag="6")]
pub hostname: ::std::option::Option<::std::string::String>,
#[prost(message, optional, tag="7")]
pub host_ip: ::std::option::Option<::std::string::String>,
#[prost(message, repeated, tag="8")]
pub id_strategy: ::std::vec::Vec<IdStrategy>,
}
#[derive(Clone, PartialEq, Message)]
#[derive(Eq, Serialize, Deserialize)]
pub struct EdgeDescription {
#[prost(string, tag="1")]
pub from: String,
#[prost(string, tag="2")]
pub to: String,
#[prost(string, tag="3")]
pub edge_name: String,
}
#[derive(Clone, PartialEq, Message)]
#[derive(Eq, Serialize, Deserialize)]
pub struct EdgeList {
#[prost(message, repeated, tag="1")]
pub edges: ::std::vec::Vec<EdgeDescription>,
}
#[derive(Clone, PartialEq, Message)]
#[derive(Eq, Serialize, Deserialize)]
pub struct GraphDescription {
#[prost(map="string, message", tag="1")]
pub nodes: ::std::collections::HashMap<String, NodeDescription>,
#[prost(map="string, message", tag="2")]
pub edges: ::std::collections::HashMap<String, EdgeList>,
#[prost(uint64, tag="3")]
pub timestamp: u64,
}
#[derive(Clone, PartialEq, Message)]
#[derive(Eq, Serialize, Deserialize)]
pub struct GeneratedSubgraphs {
#[prost(message, repeated, tag="1")]
pub subgraphs: ::std::vec::Vec<GraphDescription>,
}