1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127
// This file is @generated by prost-build.
/// **Service Mesh**: State for the whole Hub, as analyzed by the Service Mesh
/// Hub Controller.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct FeatureState {
/// Output only. Results of running Service Mesh analyzers.
#[prost(message, repeated, tag = "1")]
pub analysis_messages: ::prost::alloc::vec::Vec<AnalysisMessage>,
}
/// **Service Mesh**: State for a single Membership, as analyzed by the Service
/// Mesh Hub Controller.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct MembershipState {
/// Output only. Results of running Service Mesh analyzers.
#[prost(message, repeated, tag = "1")]
pub analysis_messages: ::prost::alloc::vec::Vec<AnalysisMessage>,
}
/// AnalysisMessageBase describes some common information that is
/// needed for all messages.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct AnalysisMessageBase {
/// Represents the specific type of a message.
#[prost(message, optional, tag = "1")]
pub r#type: ::core::option::Option<analysis_message_base::Type>,
/// Represents how severe a message is.
#[prost(enumeration = "analysis_message_base::Level", tag = "2")]
pub level: i32,
/// A url pointing to the Service Mesh or Istio documentation for this specific
/// error type.
#[prost(string, tag = "3")]
pub documentation_url: ::prost::alloc::string::String,
}
/// Nested message and enum types in `AnalysisMessageBase`.
pub mod analysis_message_base {
/// A unique identifier for the type of message. Display_name is intended to be
/// human-readable, code is intended to be machine readable. There should be a
/// one-to-one mapping between display_name and code. (i.e. do not re-use
/// display_names or codes between message types.)
/// See istio.analysis.v1alpha1.AnalysisMessageBase.Type
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Type {
/// A human-readable name for the message type. e.g. "InternalError",
/// "PodMissingProxy". This should be the same for all messages of the same
/// type. (This corresponds to the `name` field in open-source Istio.)
#[prost(string, tag = "1")]
pub display_name: ::prost::alloc::string::String,
/// A 7 character code matching `^IST\[0-9\]{4}$` or `^ASM\[0-9\]{4}$`, intended
/// to uniquely identify the message type. (e.g. "IST0001" is mapped to the
/// "InternalError" message type.)
#[prost(string, tag = "2")]
pub code: ::prost::alloc::string::String,
}
/// The values here are chosen so that more severe messages get sorted higher,
/// as well as leaving space in between to add more later
/// See istio.analysis.v1alpha1.AnalysisMessageBase.Level
#[derive(
Clone,
Copy,
Debug,
PartialEq,
Eq,
Hash,
PartialOrd,
Ord,
::prost::Enumeration
)]
#[repr(i32)]
pub enum Level {
/// Illegal. Same istio.analysis.v1alpha1.AnalysisMessageBase.Level.UNKNOWN.
Unspecified = 0,
/// ERROR represents a misconfiguration that must be fixed.
Error = 3,
/// WARNING represents a misconfiguration that should be fixed.
Warning = 8,
/// INFO represents an informational finding.
Info = 12,
}
impl Level {
/// String value of the enum field names used in the ProtoBuf definition.
///
/// The values are not transformed in any way and thus are considered stable
/// (if the ProtoBuf definition does not change) and safe for programmatic use.
pub fn as_str_name(&self) -> &'static str {
match self {
Level::Unspecified => "LEVEL_UNSPECIFIED",
Level::Error => "ERROR",
Level::Warning => "WARNING",
Level::Info => "INFO",
}
}
/// Creates an enum from field names used in the ProtoBuf definition.
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"LEVEL_UNSPECIFIED" => Some(Self::Unspecified),
"ERROR" => Some(Self::Error),
"WARNING" => Some(Self::Warning),
"INFO" => Some(Self::Info),
_ => None,
}
}
}
}
/// AnalysisMessage is a single message produced by an analyzer, and
/// it used to communicate to the end user about the state of their Service
/// Mesh configuration.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct AnalysisMessage {
/// Details common to all types of Istio and ServiceMesh analysis messages.
#[prost(message, optional, tag = "1")]
pub message_base: ::core::option::Option<AnalysisMessageBase>,
/// A human readable description of what the error means. It is suitable for
/// non-internationalize display purposes.
#[prost(string, tag = "2")]
pub description: ::prost::alloc::string::String,
/// A list of strings specifying the resource identifiers that were the cause
/// of message generation.
/// A "path" here may be:
/// * MEMBERSHIP_ID if the cause is a specific member cluster
/// * MEMBERSHIP_ID/(NAMESPACE\/)?RESOURCETYPE/NAME if the cause is a resource
/// in a cluster
#[prost(string, repeated, tag = "3")]
pub resource_paths: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
/// A UI can combine these args with a template (based on message_base.type)
/// to produce an internationalized message.
#[prost(message, optional, tag = "4")]
pub args: ::core::option::Option<::prost_types::Struct>,
}