use serde::{Deserialize, Serialize};
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ConfigMetas {
#[prost(message, repeated, tag = "1")]
pub roots: ::prost::alloc::vec::Vec<TopMeta>,
#[prost(message, optional, tag = "2")]
pub timestamp: ::core::option::Option<TopMeta>,
#[prost(message, optional, tag = "3")]
pub snapshot: ::core::option::Option<TopMeta>,
#[prost(message, optional, tag = "4")]
pub top_targets: ::core::option::Option<TopMeta>,
#[prost(message, repeated, tag = "5")]
pub delegated_targets: ::prost::alloc::vec::Vec<DelegatedMeta>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct DirectorMetas {
#[prost(message, repeated, tag = "1")]
pub roots: ::prost::alloc::vec::Vec<TopMeta>,
#[prost(message, optional, tag = "2")]
pub timestamp: ::core::option::Option<TopMeta>,
#[prost(message, optional, tag = "3")]
pub snapshot: ::core::option::Option<TopMeta>,
#[prost(message, optional, tag = "4")]
pub targets: ::core::option::Option<TopMeta>,
}
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct DelegatedMeta {
#[prost(uint64, tag = "1")]
pub version: u64,
#[prost(string, tag = "2")]
pub role: ::prost::alloc::string::String,
#[prost(bytes = "vec", tag = "3")]
pub raw: ::prost::alloc::vec::Vec<u8>,
}
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct TopMeta {
#[prost(uint64, tag = "1")]
pub version: u64,
#[prost(bytes = "vec", tag = "2")]
pub raw: ::prost::alloc::vec::Vec<u8>,
}
#[derive(Deserialize, Serialize)]
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct File {
#[prost(string, tag = "1")]
pub path: ::prost::alloc::string::String,
#[prost(bytes = "vec", tag = "2")]
#[serde(with = "serde_bytes")]
pub raw: ::prost::alloc::vec::Vec<u8>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct LatestConfigsRequest {
#[prost(string, tag = "1")]
pub hostname: ::prost::alloc::string::String,
#[prost(string, tag = "2")]
pub agent_version: ::prost::alloc::string::String,
#[prost(uint64, tag = "3")]
pub current_config_snapshot_version: u64,
#[prost(uint64, tag = "9")]
pub current_config_root_version: u64,
#[prost(uint64, tag = "8")]
pub current_director_root_version: u64,
#[prost(string, repeated, tag = "4")]
pub products: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
#[prost(string, repeated, tag = "5")]
pub new_products: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
#[prost(message, repeated, tag = "6")]
pub active_clients: ::prost::alloc::vec::Vec<Client>,
#[prost(bytes = "vec", tag = "10")]
pub backend_client_state: ::prost::alloc::vec::Vec<u8>,
#[prost(bool, tag = "11")]
pub has_error: bool,
#[prost(string, tag = "12")]
pub error: ::prost::alloc::string::String,
#[prost(string, tag = "13")]
pub trace_agent_env: ::prost::alloc::string::String,
#[prost(string, tag = "14")]
pub org_uuid: ::prost::alloc::string::String,
#[prost(string, repeated, tag = "15")]
pub tags: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
#[prost(string, tag = "16")]
pub agent_uuid: ::prost::alloc::string::String,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct LatestConfigsResponse {
#[prost(message, optional, tag = "1")]
pub config_metas: ::core::option::Option<ConfigMetas>,
#[prost(message, optional, tag = "2")]
pub director_metas: ::core::option::Option<DirectorMetas>,
#[prost(message, repeated, tag = "3")]
pub target_files: ::prost::alloc::vec::Vec<File>,
}
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct OrgDataResponse {
#[prost(string, tag = "1")]
pub uuid: ::prost::alloc::string::String,
}
#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
pub struct OrgStatusResponse {
#[prost(bool, tag = "1")]
pub enabled: bool,
#[prost(bool, tag = "2")]
pub authorized: bool,
}
#[derive(Deserialize, Serialize)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Client {
#[prost(message, optional, tag = "1")]
pub state: ::core::option::Option<ClientState>,
#[prost(string, tag = "2")]
pub id: ::prost::alloc::string::String,
#[prost(string, repeated, tag = "3")]
pub products: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
#[prost(bool, tag = "6")]
pub is_tracer: bool,
#[prost(message, optional, tag = "7")]
pub client_tracer: ::core::option::Option<ClientTracer>,
#[prost(bool, tag = "8")]
pub is_agent: bool,
#[prost(message, optional, tag = "9")]
#[serde(skip_serializing_if = "Option::is_none")]
pub client_agent: ::core::option::Option<ClientAgent>,
#[prost(uint64, tag = "10")]
pub last_seen: u64,
#[prost(bytes = "vec", tag = "11")]
pub capabilities: ::prost::alloc::vec::Vec<u8>,
#[prost(bool, tag = "14")]
pub is_updater: bool,
#[prost(message, optional, tag = "15")]
pub client_updater: ::core::option::Option<ClientUpdater>,
}
#[derive(Deserialize, Serialize)]
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct ClientTracer {
#[prost(string, tag = "1")]
pub runtime_id: ::prost::alloc::string::String,
#[prost(string, tag = "2")]
pub language: ::prost::alloc::string::String,
#[prost(string, tag = "3")]
pub tracer_version: ::prost::alloc::string::String,
#[prost(string, tag = "4")]
pub service: ::prost::alloc::string::String,
#[prost(string, repeated, tag = "8")]
pub extra_services: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
#[prost(string, tag = "5")]
pub env: ::prost::alloc::string::String,
#[prost(string, tag = "6")]
pub app_version: ::prost::alloc::string::String,
#[prost(string, repeated, tag = "7")]
pub tags: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
#[prost(string, repeated, tag = "9")]
pub process_tags: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
#[prost(string, repeated, tag = "10")]
pub container_tags: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
}
#[derive(Deserialize, Serialize)]
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct ClientAgent {
#[prost(string, tag = "1")]
pub name: ::prost::alloc::string::String,
#[prost(string, tag = "2")]
pub version: ::prost::alloc::string::String,
#[prost(string, tag = "3")]
pub cluster_name: ::prost::alloc::string::String,
#[prost(string, tag = "4")]
pub cluster_id: ::prost::alloc::string::String,
#[prost(string, repeated, tag = "5")]
pub cws_workloads: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
}
#[derive(Deserialize, Serialize)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ClientUpdater {
#[prost(string, repeated, tag = "1")]
pub tags: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
#[prost(message, repeated, tag = "2")]
pub packages: ::prost::alloc::vec::Vec<PackageState>,
#[prost(uint64, tag = "3")]
pub available_disk_space: u64,
#[prost(string, tag = "4")]
pub secrets_pub_key: ::prost::alloc::string::String,
}
#[derive(Deserialize, Serialize)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct PackageState {
#[prost(string, tag = "1")]
pub package: ::prost::alloc::string::String,
#[prost(string, tag = "2")]
pub stable_version: ::prost::alloc::string::String,
#[prost(string, tag = "3")]
pub experiment_version: ::prost::alloc::string::String,
#[prost(message, optional, tag = "4")]
pub task: ::core::option::Option<PackageStateTask>,
#[prost(string, tag = "11")]
pub stable_config_version: ::prost::alloc::string::String,
#[prost(string, tag = "12")]
pub experiment_config_version: ::prost::alloc::string::String,
#[prost(string, tag = "13")]
pub running_version: ::prost::alloc::string::String,
#[prost(string, tag = "14")]
pub running_config_version: ::prost::alloc::string::String,
#[prost(uint64, tag = "15")]
pub heartbeat_timestamp: u64,
#[prost(float, tag = "16")]
pub completion: f32,
}
#[derive(Deserialize, Serialize)]
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct PackageStateTask {
#[prost(string, tag = "1")]
pub id: ::prost::alloc::string::String,
#[prost(enumeration = "TaskState", tag = "2")]
pub state: i32,
#[prost(message, optional, tag = "3")]
pub error: ::core::option::Option<TaskError>,
}
#[derive(Deserialize, Serialize)]
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct TaskError {
#[prost(uint64, tag = "1")]
pub code: u64,
#[prost(string, tag = "2")]
pub message: ::prost::alloc::string::String,
}
#[derive(Deserialize, Serialize)]
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct ConfigState {
#[prost(string, tag = "1")]
pub id: ::prost::alloc::string::String,
#[prost(uint64, tag = "2")]
pub version: u64,
#[prost(string, tag = "3")]
pub product: ::prost::alloc::string::String,
#[prost(uint64, tag = "4")]
pub apply_state: u64,
#[prost(string, tag = "5")]
pub apply_error: ::prost::alloc::string::String,
}
#[derive(Deserialize, Serialize)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ClientState {
#[prost(uint64, tag = "1")]
pub root_version: u64,
#[prost(uint64, tag = "2")]
pub targets_version: u64,
#[prost(message, repeated, tag = "3")]
pub config_states: ::prost::alloc::vec::Vec<ConfigState>,
#[prost(bool, tag = "4")]
pub has_error: bool,
#[prost(string, tag = "5")]
pub error: ::prost::alloc::string::String,
#[prost(bytes = "vec", tag = "6")]
pub backend_client_state: ::prost::alloc::vec::Vec<u8>,
}
#[derive(Deserialize, Serialize)]
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct TargetFileHash {
#[prost(string, tag = "1")]
pub algorithm: ::prost::alloc::string::String,
#[prost(string, tag = "3")]
pub hash: ::prost::alloc::string::String,
}
#[derive(Deserialize, Serialize)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct TargetFileMeta {
#[prost(string, tag = "1")]
pub path: ::prost::alloc::string::String,
#[prost(int64, tag = "2")]
pub length: i64,
#[prost(message, repeated, tag = "3")]
pub hashes: ::prost::alloc::vec::Vec<TargetFileHash>,
}
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct ConfigSubscriptionRequest {
#[prost(string, tag = "1")]
pub runtime_id: ::prost::alloc::string::String,
#[prost(enumeration = "config_subscription_request::Action", tag = "2")]
pub action: i32,
#[prost(enumeration = "ConfigSubscriptionProducts", tag = "3")]
pub products: i32,
}
pub mod config_subscription_request {
#[derive(
Clone,
Copy,
Debug,
PartialEq,
Eq,
Hash,
PartialOrd,
Ord,
::prost::Enumeration
)]
#[repr(i32)]
pub enum Action {
Invalid = 0,
Track = 1,
Untrack = 2,
}
impl Action {
pub fn as_str_name(&self) -> &'static str {
match self {
Self::Invalid => "INVALID",
Self::Track => "TRACK",
Self::Untrack => "UNTRACK",
}
}
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"INVALID" => Some(Self::Invalid),
"TRACK" => Some(Self::Track),
"UNTRACK" => Some(Self::Untrack),
_ => None,
}
}
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ConfigSubscriptionResponse {
#[prost(message, optional, tag = "1")]
pub client: ::core::option::Option<Client>,
#[prost(string, repeated, tag = "2")]
pub matched_configs: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
#[prost(message, repeated, tag = "3")]
pub target_files: ::prost::alloc::vec::Vec<File>,
}
#[derive(Deserialize, Serialize)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ClientGetConfigsRequest {
#[prost(message, optional, tag = "1")]
pub client: ::core::option::Option<Client>,
#[prost(message, repeated, tag = "2")]
pub cached_target_files: ::prost::alloc::vec::Vec<TargetFileMeta>,
}
#[derive(Deserialize, Serialize)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ClientGetConfigsResponse {
#[prost(bytes = "vec", repeated, tag = "1")]
#[serde(with = "crate::serde")]
#[serde(default)]
pub roots: ::prost::alloc::vec::Vec<::prost::alloc::vec::Vec<u8>>,
#[prost(bytes = "vec", tag = "2")]
#[serde(with = "serde_bytes")]
#[serde(default)]
pub targets: ::prost::alloc::vec::Vec<u8>,
#[prost(message, repeated, tag = "3")]
#[serde(default)]
pub target_files: ::prost::alloc::vec::Vec<File>,
#[prost(string, repeated, tag = "4")]
#[serde(default)]
pub client_configs: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
#[prost(enumeration = "ConfigStatus", tag = "5")]
#[serde(default)]
pub config_status: i32,
}
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct FileMetaState {
#[prost(uint64, tag = "1")]
pub version: u64,
#[prost(string, tag = "2")]
pub hash: ::prost::alloc::string::String,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetStateConfigResponse {
#[prost(map = "string, message", tag = "1")]
pub config_state: ::std::collections::HashMap<
::prost::alloc::string::String,
FileMetaState,
>,
#[prost(map = "string, message", tag = "2")]
pub director_state: ::std::collections::HashMap<
::prost::alloc::string::String,
FileMetaState,
>,
#[prost(map = "string, string", tag = "3")]
pub target_filenames: ::std::collections::HashMap<
::prost::alloc::string::String,
::prost::alloc::string::String,
>,
#[prost(message, repeated, tag = "4")]
pub active_clients: ::prost::alloc::vec::Vec<Client>,
#[prost(message, repeated, tag = "5")]
pub config_subscription_states: ::prost::alloc::vec::Vec<ConfigSubscriptionState>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ConfigSubscriptionState {
#[prost(uint64, tag = "1")]
pub subscription_id: u64,
#[prost(message, repeated, tag = "2")]
pub tracked_clients: ::prost::alloc::vec::Vec<
config_subscription_state::TrackedClient,
>,
}
pub mod config_subscription_state {
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct TrackedClient {
#[prost(string, tag = "1")]
pub runtime_id: ::prost::alloc::string::String,
#[prost(bool, tag = "2")]
pub seen_any: bool,
#[prost(enumeration = "super::ConfigSubscriptionProducts", tag = "3")]
pub products: i32,
}
}
#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
pub struct ResetStateConfigResponse {}
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct TracerPredicateV1 {
#[prost(string, tag = "1")]
pub client_id: ::prost::alloc::string::String,
#[prost(string, tag = "2")]
pub service: ::prost::alloc::string::String,
#[prost(string, tag = "3")]
pub environment: ::prost::alloc::string::String,
#[prost(string, tag = "4")]
pub app_version: ::prost::alloc::string::String,
#[prost(string, tag = "5")]
pub tracer_version: ::prost::alloc::string::String,
#[prost(string, tag = "6")]
pub language: ::prost::alloc::string::String,
#[prost(string, tag = "7")]
pub runtime_id: ::prost::alloc::string::String,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct TracerPredicates {
#[prost(message, repeated, tag = "1")]
pub tracer_predicates_v1: ::prost::alloc::vec::Vec<TracerPredicateV1>,
}
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum TaskState {
Idle = 0,
Running = 1,
Done = 2,
InvalidState = 3,
Error = 4,
}
impl TaskState {
pub fn as_str_name(&self) -> &'static str {
match self {
Self::Idle => "IDLE",
Self::Running => "RUNNING",
Self::Done => "DONE",
Self::InvalidState => "INVALID_STATE",
Self::Error => "ERROR",
}
}
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"IDLE" => Some(Self::Idle),
"RUNNING" => Some(Self::Running),
"DONE" => Some(Self::Done),
"INVALID_STATE" => Some(Self::InvalidState),
"ERROR" => Some(Self::Error),
_ => None,
}
}
}
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum ConfigSubscriptionProducts {
Invalid = 0,
LiveDebugging = 1,
}
impl ConfigSubscriptionProducts {
pub fn as_str_name(&self) -> &'static str {
match self {
Self::Invalid => "INVALID",
Self::LiveDebugging => "LIVE_DEBUGGING",
}
}
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"INVALID" => Some(Self::Invalid),
"LIVE_DEBUGGING" => Some(Self::LiveDebugging),
_ => None,
}
}
}
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum ConfigStatus {
Ok = 0,
Expired = 1,
}
impl ConfigStatus {
pub fn as_str_name(&self) -> &'static str {
match self {
Self::Ok => "CONFIG_STATUS_OK",
Self::Expired => "CONFIG_STATUS_EXPIRED",
}
}
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"CONFIG_STATUS_OK" => Some(Self::Ok),
"CONFIG_STATUS_EXPIRED" => Some(Self::Expired),
_ => None,
}
}
}