#[derive(serde::Serialize, serde::Deserialize)]
#[serde(rename_all = "snake_case")]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Rule {
#[prost(message, optional, tag = "1")]
pub id: ::core::option::Option<::prost::alloc::string::String>,
#[prost(message, optional, tag = "2")]
pub name: ::core::option::Option<::prost::alloc::string::String>,
#[prost(message, optional, tag = "3")]
pub description: ::core::option::Option<::prost::alloc::string::String>,
#[prost(message, optional, tag = "5")]
pub source_field: ::core::option::Option<::prost::alloc::string::String>,
#[prost(message, optional, tag = "6")]
pub parameters: ::core::option::Option<RuleParameters>,
#[prost(message, optional, tag = "7")]
pub enabled: ::core::option::Option<bool>,
#[prost(message, optional, tag = "8")]
pub order: ::core::option::Option<u32>,
}
#[derive(serde::Serialize, serde::Deserialize)]
#[serde(rename_all = "snake_case")]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct RuleParameters {
#[prost(
oneof = "rule_parameters::RuleParameters",
tags = "1, 2, 3, 4, 5, 6, 7, 8, 9, 10"
)]
pub rule_parameters: ::core::option::Option<rule_parameters::RuleParameters>,
}
pub mod rule_parameters {
#[derive(serde::Serialize, serde::Deserialize)]
#[serde(rename_all = "snake_case")]
#[derive(Clone, PartialEq, ::prost::Oneof)]
pub enum RuleParameters {
#[prost(message, tag = "1")]
ExtractParameters(super::ExtractParameters),
#[prost(message, tag = "2")]
JsonExtractParameters(super::JsonExtractParameters),
#[prost(message, tag = "3")]
ReplaceParameters(super::ReplaceParameters),
#[prost(message, tag = "4")]
ParseParameters(super::ParseParameters),
#[prost(message, tag = "5")]
AllowParameters(super::AllowParameters),
#[prost(message, tag = "6")]
BlockParameters(super::BlockParameters),
#[prost(message, tag = "7")]
ExtractTimestampParameters(super::ExtractTimestampParameters),
#[prost(message, tag = "8")]
RemoveFieldsParameters(super::RemoveFieldsParameters),
#[prost(message, tag = "9")]
JsonStringifyParameters(super::JsonStringifyParameters),
#[prost(message, tag = "10")]
JsonParseParameters(super::JsonParseParameters),
}
}
#[derive(serde::Serialize, serde::Deserialize)]
#[serde(rename_all = "snake_case")]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ExtractParameters {
#[prost(message, optional, tag = "2")]
pub rule: ::core::option::Option<::prost::alloc::string::String>,
}
#[derive(serde::Serialize, serde::Deserialize)]
#[serde(rename_all = "snake_case")]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct JsonExtractParameters {
#[prost(enumeration = "json_extract_parameters::DestinationField", tag = "1")]
pub destination_field_type: i32,
#[prost(message, optional, tag = "2")]
pub rule: ::core::option::Option<::prost::alloc::string::String>,
#[prost(message, optional, tag = "3")]
pub destination_field_text: ::core::option::Option<::prost::alloc::string::String>,
}
pub mod json_extract_parameters {
#[derive(serde::Serialize, serde::Deserialize)]
#[serde(rename_all = "snake_case")]
#[derive(
Clone,
Copy,
Debug,
PartialEq,
Eq,
Hash,
PartialOrd,
Ord,
::prost::Enumeration
)]
#[repr(i32)]
pub enum DestinationField {
CategoryOrUnspecified = 0,
Classname = 1,
Methodname = 2,
Threadid = 3,
Severity = 4,
Text = 5,
}
impl DestinationField {
pub fn as_str_name(&self) -> &'static str {
match self {
Self::CategoryOrUnspecified => {
"DESTINATION_FIELD_CATEGORY_OR_UNSPECIFIED"
}
Self::Classname => "DESTINATION_FIELD_CLASSNAME",
Self::Methodname => "DESTINATION_FIELD_METHODNAME",
Self::Threadid => "DESTINATION_FIELD_THREADID",
Self::Severity => "DESTINATION_FIELD_SEVERITY",
Self::Text => "DESTINATION_FIELD_TEXT",
}
}
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"DESTINATION_FIELD_CATEGORY_OR_UNSPECIFIED" => {
Some(Self::CategoryOrUnspecified)
}
"DESTINATION_FIELD_CLASSNAME" => Some(Self::Classname),
"DESTINATION_FIELD_METHODNAME" => Some(Self::Methodname),
"DESTINATION_FIELD_THREADID" => Some(Self::Threadid),
"DESTINATION_FIELD_SEVERITY" => Some(Self::Severity),
"DESTINATION_FIELD_TEXT" => Some(Self::Text),
_ => None,
}
}
}
}
#[derive(serde::Serialize, serde::Deserialize)]
#[serde(rename_all = "snake_case")]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ReplaceParameters {
#[prost(message, optional, tag = "1")]
pub destination_field: ::core::option::Option<::prost::alloc::string::String>,
#[prost(message, optional, tag = "2")]
pub replace_new_val: ::core::option::Option<::prost::alloc::string::String>,
#[prost(message, optional, tag = "3")]
pub rule: ::core::option::Option<::prost::alloc::string::String>,
}
#[derive(serde::Serialize, serde::Deserialize)]
#[serde(rename_all = "snake_case")]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ParseParameters {
#[prost(message, optional, tag = "1")]
pub destination_field: ::core::option::Option<::prost::alloc::string::String>,
#[prost(message, optional, tag = "2")]
pub rule: ::core::option::Option<::prost::alloc::string::String>,
}
#[derive(serde::Serialize, serde::Deserialize)]
#[serde(rename_all = "snake_case")]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct AllowParameters {
#[prost(message, optional, tag = "1")]
pub keep_blocked_logs: ::core::option::Option<bool>,
#[prost(message, optional, tag = "2")]
pub rule: ::core::option::Option<::prost::alloc::string::String>,
}
#[derive(serde::Serialize, serde::Deserialize)]
#[serde(rename_all = "snake_case")]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct BlockParameters {
#[prost(message, optional, tag = "1")]
pub keep_blocked_logs: ::core::option::Option<bool>,
#[prost(message, optional, tag = "2")]
pub rule: ::core::option::Option<::prost::alloc::string::String>,
}
#[derive(serde::Serialize, serde::Deserialize)]
#[serde(rename_all = "snake_case")]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ExtractTimestampParameters {
#[prost(enumeration = "extract_timestamp_parameters::FormatStandard", tag = "1")]
pub standard: i32,
#[prost(message, optional, tag = "2")]
pub format: ::core::option::Option<::prost::alloc::string::String>,
}
pub mod extract_timestamp_parameters {
#[derive(serde::Serialize, serde::Deserialize)]
#[serde(rename_all = "snake_case")]
#[derive(
Clone,
Copy,
Debug,
PartialEq,
Eq,
Hash,
PartialOrd,
Ord,
::prost::Enumeration
)]
#[repr(i32)]
pub enum FormatStandard {
StrftimeOrUnspecified = 0,
Javasdf = 1,
Golang = 2,
Secondsts = 3,
Millits = 4,
Microts = 5,
Nanots = 6,
}
impl FormatStandard {
pub fn as_str_name(&self) -> &'static str {
match self {
Self::StrftimeOrUnspecified => "FORMAT_STANDARD_STRFTIME_OR_UNSPECIFIED",
Self::Javasdf => "FORMAT_STANDARD_JAVASDF",
Self::Golang => "FORMAT_STANDARD_GOLANG",
Self::Secondsts => "FORMAT_STANDARD_SECONDSTS",
Self::Millits => "FORMAT_STANDARD_MILLITS",
Self::Microts => "FORMAT_STANDARD_MICROTS",
Self::Nanots => "FORMAT_STANDARD_NANOTS",
}
}
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"FORMAT_STANDARD_STRFTIME_OR_UNSPECIFIED" => {
Some(Self::StrftimeOrUnspecified)
}
"FORMAT_STANDARD_JAVASDF" => Some(Self::Javasdf),
"FORMAT_STANDARD_GOLANG" => Some(Self::Golang),
"FORMAT_STANDARD_SECONDSTS" => Some(Self::Secondsts),
"FORMAT_STANDARD_MILLITS" => Some(Self::Millits),
"FORMAT_STANDARD_MICROTS" => Some(Self::Microts),
"FORMAT_STANDARD_NANOTS" => Some(Self::Nanots),
_ => None,
}
}
}
}
#[derive(serde::Serialize, serde::Deserialize)]
#[serde(rename_all = "snake_case")]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct RemoveFieldsParameters {
#[prost(string, repeated, tag = "1")]
pub fields: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
}
#[derive(serde::Serialize, serde::Deserialize)]
#[serde(rename_all = "snake_case")]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct JsonStringifyParameters {
#[prost(message, optional, tag = "1")]
pub destination_field: ::core::option::Option<::prost::alloc::string::String>,
#[prost(message, optional, tag = "2")]
pub delete_source: ::core::option::Option<bool>,
}
#[derive(serde::Serialize, serde::Deserialize)]
#[serde(rename_all = "snake_case")]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct JsonParseParameters {
#[prost(message, optional, tag = "1")]
pub destination_field: ::core::option::Option<::prost::alloc::string::String>,
#[prost(message, optional, tag = "2")]
pub delete_source: ::core::option::Option<bool>,
#[prost(message, optional, tag = "3")]
pub escaped_value: ::core::option::Option<bool>,
#[prost(message, optional, tag = "4")]
pub override_dest: ::core::option::Option<bool>,
}
#[derive(serde::Serialize, serde::Deserialize)]
#[serde(rename_all = "snake_case")]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct RuleMatcher {
#[prost(oneof = "rule_matcher::Constraint", tags = "1, 2, 9")]
pub constraint: ::core::option::Option<rule_matcher::Constraint>,
}
pub mod rule_matcher {
#[derive(serde::Serialize, serde::Deserialize)]
#[serde(rename_all = "snake_case")]
#[derive(Clone, PartialEq, ::prost::Oneof)]
pub enum Constraint {
#[prost(message, tag = "1")]
ApplicationName(super::ApplicationNameConstraint),
#[prost(message, tag = "2")]
SubsystemName(super::SubsystemNameConstraint),
#[prost(message, tag = "9")]
Severity(super::SeverityConstraint),
}
}
#[derive(serde::Serialize, serde::Deserialize)]
#[serde(rename_all = "snake_case")]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ApplicationNameConstraint {
#[prost(message, optional, tag = "1")]
pub value: ::core::option::Option<::prost::alloc::string::String>,
}
#[derive(serde::Serialize, serde::Deserialize)]
#[serde(rename_all = "snake_case")]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct SubsystemNameConstraint {
#[prost(message, optional, tag = "1")]
pub value: ::core::option::Option<::prost::alloc::string::String>,
}
#[derive(serde::Serialize, serde::Deserialize)]
#[serde(rename_all = "snake_case")]
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct SeverityConstraint {
#[prost(enumeration = "severity_constraint::Value", tag = "1")]
pub value: i32,
}
pub mod severity_constraint {
#[derive(serde::Serialize, serde::Deserialize)]
#[serde(rename_all = "snake_case")]
#[derive(
Clone,
Copy,
Debug,
PartialEq,
Eq,
Hash,
PartialOrd,
Ord,
::prost::Enumeration
)]
#[repr(i32)]
pub enum Value {
DebugOrUnspecified = 0,
Verbose = 1,
Info = 2,
Warning = 3,
Error = 4,
Critical = 5,
}
impl Value {
pub fn as_str_name(&self) -> &'static str {
match self {
Self::DebugOrUnspecified => "VALUE_DEBUG_OR_UNSPECIFIED",
Self::Verbose => "VALUE_VERBOSE",
Self::Info => "VALUE_INFO",
Self::Warning => "VALUE_WARNING",
Self::Error => "VALUE_ERROR",
Self::Critical => "VALUE_CRITICAL",
}
}
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"VALUE_DEBUG_OR_UNSPECIFIED" => Some(Self::DebugOrUnspecified),
"VALUE_VERBOSE" => Some(Self::Verbose),
"VALUE_INFO" => Some(Self::Info),
"VALUE_WARNING" => Some(Self::Warning),
"VALUE_ERROR" => Some(Self::Error),
"VALUE_CRITICAL" => Some(Self::Critical),
_ => None,
}
}
}
}
#[derive(serde::Serialize, serde::Deserialize)]
#[serde(rename_all = "snake_case")]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct RuleSubgroup {
#[prost(message, optional, tag = "1")]
pub id: ::core::option::Option<::prost::alloc::string::String>,
#[prost(message, repeated, tag = "2")]
pub rules: ::prost::alloc::vec::Vec<Rule>,
#[prost(message, optional, tag = "3")]
pub enabled: ::core::option::Option<bool>,
#[prost(message, optional, tag = "4")]
pub order: ::core::option::Option<u32>,
}
#[derive(serde::Serialize, serde::Deserialize)]
#[serde(rename_all = "snake_case")]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct RuleGroup {
#[prost(message, optional, tag = "1")]
pub id: ::core::option::Option<::prost::alloc::string::String>,
#[prost(message, optional, tag = "2")]
pub name: ::core::option::Option<::prost::alloc::string::String>,
#[prost(message, optional, tag = "3")]
pub description: ::core::option::Option<::prost::alloc::string::String>,
#[prost(message, optional, tag = "6")]
pub creator: ::core::option::Option<::prost::alloc::string::String>,
#[prost(message, optional, tag = "7")]
pub enabled: ::core::option::Option<bool>,
#[prost(message, optional, tag = "8")]
pub hidden: ::core::option::Option<bool>,
#[prost(message, repeated, tag = "9")]
pub rule_matchers: ::prost::alloc::vec::Vec<RuleMatcher>,
#[prost(message, repeated, tag = "10")]
pub rule_subgroups: ::prost::alloc::vec::Vec<RuleSubgroup>,
#[prost(message, optional, tag = "11")]
pub order: ::core::option::Option<u32>,
}
#[derive(serde::Serialize, serde::Deserialize)]
#[serde(rename_all = "snake_case")]
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct TeamId {
#[prost(uint32, tag = "1")]
pub id: u32,
}
#[derive(serde::Serialize, serde::Deserialize)]
#[serde(rename_all = "snake_case")]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct AuditLogDescription {
#[prost(string, optional, tag = "1")]
pub description: ::core::option::Option<::prost::alloc::string::String>,
}
#[derive(serde::Serialize, serde::Deserialize)]
#[serde(rename_all = "snake_case")]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetRuleGroupRequest {
#[prost(string, tag = "1")]
pub group_id: ::prost::alloc::string::String,
}
#[derive(serde::Serialize, serde::Deserialize)]
#[serde(rename_all = "snake_case")]
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct ListRuleGroupsRequest {}
#[derive(serde::Serialize, serde::Deserialize)]
#[serde(rename_all = "snake_case")]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ListRuleGroupsResponse {
#[prost(message, repeated, tag = "1")]
pub rule_groups: ::prost::alloc::vec::Vec<RuleGroup>,
}
#[derive(serde::Serialize, serde::Deserialize)]
#[serde(rename_all = "snake_case")]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetRuleGroupResponse {
#[prost(message, optional, tag = "1")]
pub rule_group: ::core::option::Option<RuleGroup>,
}
#[derive(serde::Serialize, serde::Deserialize)]
#[serde(rename_all = "snake_case")]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CreateRuleGroupRequest {
#[prost(message, optional, tag = "1")]
pub name: ::core::option::Option<::prost::alloc::string::String>,
#[prost(message, optional, tag = "2")]
pub description: ::core::option::Option<::prost::alloc::string::String>,
#[prost(message, optional, tag = "3")]
pub enabled: ::core::option::Option<bool>,
#[prost(message, optional, tag = "4")]
pub hidden: ::core::option::Option<bool>,
#[prost(message, optional, tag = "5")]
pub creator: ::core::option::Option<::prost::alloc::string::String>,
#[prost(message, repeated, tag = "6")]
pub rule_matchers: ::prost::alloc::vec::Vec<RuleMatcher>,
#[prost(message, repeated, tag = "7")]
pub rule_subgroups: ::prost::alloc::vec::Vec<
create_rule_group_request::CreateRuleSubgroup,
>,
#[prost(message, optional, tag = "8")]
pub order: ::core::option::Option<u32>,
#[prost(message, optional, tag = "9")]
pub team_id: ::core::option::Option<TeamId>,
}
pub mod create_rule_group_request {
#[derive(serde::Serialize, serde::Deserialize)]
#[serde(rename_all = "snake_case")]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CreateRuleSubgroup {
#[prost(message, repeated, tag = "1")]
pub rules: ::prost::alloc::vec::Vec<create_rule_subgroup::CreateRule>,
#[prost(message, optional, tag = "2")]
pub enabled: ::core::option::Option<bool>,
#[prost(message, optional, tag = "3")]
pub order: ::core::option::Option<u32>,
}
pub mod create_rule_subgroup {
#[derive(serde::Serialize, serde::Deserialize)]
#[serde(rename_all = "snake_case")]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CreateRule {
#[prost(message, optional, tag = "1")]
pub name: ::core::option::Option<::prost::alloc::string::String>,
#[prost(message, optional, tag = "3")]
pub description: ::core::option::Option<::prost::alloc::string::String>,
#[prost(message, optional, tag = "4")]
pub source_field: ::core::option::Option<::prost::alloc::string::String>,
#[prost(message, optional, tag = "5")]
pub parameters: ::core::option::Option<super::super::RuleParameters>,
#[prost(message, optional, tag = "6")]
pub enabled: ::core::option::Option<bool>,
#[prost(message, optional, tag = "7")]
pub order: ::core::option::Option<u32>,
}
}
}
#[derive(serde::Serialize, serde::Deserialize)]
#[serde(rename_all = "snake_case")]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CreateRuleGroupResponse {
#[prost(message, optional, tag = "1")]
pub rule_group: ::core::option::Option<RuleGroup>,
}
#[derive(serde::Serialize, serde::Deserialize)]
#[serde(rename_all = "snake_case")]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct UpdateRuleGroupRequest {
#[prost(message, optional, tag = "1")]
pub group_id: ::core::option::Option<::prost::alloc::string::String>,
#[prost(message, optional, tag = "2")]
pub rule_group: ::core::option::Option<CreateRuleGroupRequest>,
}
#[derive(serde::Serialize, serde::Deserialize)]
#[serde(rename_all = "snake_case")]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct UpdateRuleGroupResponse {
#[prost(message, optional, tag = "1")]
pub rule_group: ::core::option::Option<RuleGroup>,
}
#[derive(serde::Serialize, serde::Deserialize)]
#[serde(rename_all = "snake_case")]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct DeleteRuleGroupRequest {
#[prost(string, tag = "1")]
pub group_id: ::prost::alloc::string::String,
}
#[derive(serde::Serialize, serde::Deserialize)]
#[serde(rename_all = "snake_case")]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct BulkDeleteRuleGroupRequest {
#[prost(string, repeated, tag = "1")]
pub group_ids: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
}
#[derive(serde::Serialize, serde::Deserialize)]
#[serde(rename_all = "snake_case")]
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct DeleteRuleGroupResponse {}
#[derive(serde::Serialize, serde::Deserialize)]
#[serde(rename_all = "snake_case")]
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct BulkDeleteRuleGroupResponse {}
#[derive(serde::Serialize, serde::Deserialize)]
#[serde(rename_all = "snake_case")]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetRuleGroupModelMappingRequest {
#[prost(message, optional, tag = "1")]
pub name: ::core::option::Option<::prost::alloc::string::String>,
#[prost(message, optional, tag = "2")]
pub description: ::core::option::Option<::prost::alloc::string::String>,
#[prost(message, optional, tag = "3")]
pub enabled: ::core::option::Option<bool>,
#[prost(message, optional, tag = "4")]
pub hidden: ::core::option::Option<bool>,
#[prost(message, optional, tag = "5")]
pub creator: ::core::option::Option<::prost::alloc::string::String>,
#[prost(message, repeated, tag = "6")]
pub rule_matchers: ::prost::alloc::vec::Vec<RuleMatcher>,
#[prost(message, repeated, tag = "7")]
pub rule_subgroups: ::prost::alloc::vec::Vec<
get_rule_group_model_mapping_request::CreateRuleSubgroup,
>,
#[prost(message, optional, tag = "8")]
pub order: ::core::option::Option<u32>,
}
pub mod get_rule_group_model_mapping_request {
#[derive(serde::Serialize, serde::Deserialize)]
#[serde(rename_all = "snake_case")]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CreateRuleSubgroup {
#[prost(message, repeated, tag = "1")]
pub rules: ::prost::alloc::vec::Vec<create_rule_subgroup::CreateRule>,
#[prost(message, optional, tag = "2")]
pub enabled: ::core::option::Option<bool>,
#[prost(message, optional, tag = "3")]
pub order: ::core::option::Option<u32>,
}
pub mod create_rule_subgroup {
#[derive(serde::Serialize, serde::Deserialize)]
#[serde(rename_all = "snake_case")]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CreateRule {
#[prost(message, optional, tag = "1")]
pub name: ::core::option::Option<::prost::alloc::string::String>,
#[prost(message, optional, tag = "3")]
pub description: ::core::option::Option<::prost::alloc::string::String>,
#[prost(message, optional, tag = "4")]
pub source_field: ::core::option::Option<::prost::alloc::string::String>,
#[prost(message, optional, tag = "5")]
pub parameters: ::core::option::Option<super::super::RuleParameters>,
#[prost(message, optional, tag = "6")]
pub enabled: ::core::option::Option<bool>,
#[prost(message, optional, tag = "7")]
pub order: ::core::option::Option<u32>,
}
}
}
#[derive(serde::Serialize, serde::Deserialize)]
#[serde(rename_all = "snake_case")]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetRuleGroupModelMappingResponse {
#[prost(message, optional, tag = "1")]
pub rule_definition: ::core::option::Option<::prost_wkt_types::Struct>,
}
#[derive(serde::Serialize, serde::Deserialize)]
#[serde(rename_all = "snake_case")]
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct GetCompanyUsageLimitsRequest {}
#[derive(serde::Serialize, serde::Deserialize)]
#[serde(rename_all = "snake_case")]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetCompanyUsageLimitsResponse {
#[prost(message, optional, tag = "1")]
pub company_id: ::core::option::Option<::prost::alloc::string::String>,
#[prost(message, optional, tag = "2")]
pub limits: ::core::option::Option<get_company_usage_limits_response::Counts>,
#[prost(message, optional, tag = "3")]
pub usage: ::core::option::Option<get_company_usage_limits_response::Counts>,
}
pub mod get_company_usage_limits_response {
#[derive(serde::Serialize, serde::Deserialize)]
#[serde(rename_all = "snake_case")]
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct Counts {
#[prost(message, optional, tag = "1")]
pub parsing_themes: ::core::option::Option<i32>,
#[prost(message, optional, tag = "2")]
pub groups: ::core::option::Option<i32>,
#[prost(message, optional, tag = "3")]
pub rules: ::core::option::Option<i32>,
}
}
pub mod rule_groups_service_client {
#![allow(
unused_variables,
dead_code,
missing_docs,
clippy::wildcard_imports,
clippy::let_unit_value,
)]
use tonic::codegen::*;
use tonic::codegen::http::Uri;
#[derive(Debug, Clone)]
pub struct RuleGroupsServiceClient<T> {
inner: tonic::client::Grpc<T>,
}
impl RuleGroupsServiceClient<tonic::transport::Channel> {
pub async fn connect<D>(dst: D) -> Result<Self, tonic::transport::Error>
where
D: TryInto<tonic::transport::Endpoint>,
D::Error: Into<StdError>,
{
let conn = tonic::transport::Endpoint::new(dst)?.connect().await?;
Ok(Self::new(conn))
}
}
impl<T> RuleGroupsServiceClient<T>
where
T: tonic::client::GrpcService<tonic::body::BoxBody>,
T::Error: Into<StdError>,
T::ResponseBody: Body<Data = Bytes> + std::marker::Send + 'static,
<T::ResponseBody as Body>::Error: Into<StdError> + std::marker::Send,
{
pub fn new(inner: T) -> Self {
let inner = tonic::client::Grpc::new(inner);
Self { inner }
}
pub fn with_origin(inner: T, origin: Uri) -> Self {
let inner = tonic::client::Grpc::with_origin(inner, origin);
Self { inner }
}
pub fn with_interceptor<F>(
inner: T,
interceptor: F,
) -> RuleGroupsServiceClient<InterceptedService<T, F>>
where
F: tonic::service::Interceptor,
T::ResponseBody: Default,
T: tonic::codegen::Service<
http::Request<tonic::body::BoxBody>,
Response = http::Response<
<T as tonic::client::GrpcService<tonic::body::BoxBody>>::ResponseBody,
>,
>,
<T as tonic::codegen::Service<
http::Request<tonic::body::BoxBody>,
>>::Error: Into<StdError> + std::marker::Send + std::marker::Sync,
{
RuleGroupsServiceClient::new(InterceptedService::new(inner, interceptor))
}
#[must_use]
pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self {
self.inner = self.inner.send_compressed(encoding);
self
}
#[must_use]
pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self {
self.inner = self.inner.accept_compressed(encoding);
self
}
#[must_use]
pub fn max_decoding_message_size(mut self, limit: usize) -> Self {
self.inner = self.inner.max_decoding_message_size(limit);
self
}
#[must_use]
pub fn max_encoding_message_size(mut self, limit: usize) -> Self {
self.inner = self.inner.max_encoding_message_size(limit);
self
}
pub async fn get_rule_group(
&mut self,
request: impl tonic::IntoRequest<super::GetRuleGroupRequest>,
) -> std::result::Result<
tonic::Response<super::GetRuleGroupResponse>,
tonic::Status,
> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::unknown(
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/com.coralogix.rules.v1.RuleGroupsService/GetRuleGroup",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"com.coralogix.rules.v1.RuleGroupsService",
"GetRuleGroup",
),
);
self.inner.unary(req, path, codec).await
}
pub async fn list_rule_groups(
&mut self,
request: impl tonic::IntoRequest<super::ListRuleGroupsRequest>,
) -> std::result::Result<
tonic::Response<super::ListRuleGroupsResponse>,
tonic::Status,
> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::unknown(
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/com.coralogix.rules.v1.RuleGroupsService/ListRuleGroups",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"com.coralogix.rules.v1.RuleGroupsService",
"ListRuleGroups",
),
);
self.inner.unary(req, path, codec).await
}
pub async fn create_rule_group(
&mut self,
request: impl tonic::IntoRequest<super::CreateRuleGroupRequest>,
) -> std::result::Result<
tonic::Response<super::CreateRuleGroupResponse>,
tonic::Status,
> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::unknown(
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/com.coralogix.rules.v1.RuleGroupsService/CreateRuleGroup",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"com.coralogix.rules.v1.RuleGroupsService",
"CreateRuleGroup",
),
);
self.inner.unary(req, path, codec).await
}
pub async fn update_rule_group(
&mut self,
request: impl tonic::IntoRequest<super::UpdateRuleGroupRequest>,
) -> std::result::Result<
tonic::Response<super::UpdateRuleGroupResponse>,
tonic::Status,
> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::unknown(
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/com.coralogix.rules.v1.RuleGroupsService/UpdateRuleGroup",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"com.coralogix.rules.v1.RuleGroupsService",
"UpdateRuleGroup",
),
);
self.inner.unary(req, path, codec).await
}
pub async fn delete_rule_group(
&mut self,
request: impl tonic::IntoRequest<super::DeleteRuleGroupRequest>,
) -> std::result::Result<
tonic::Response<super::DeleteRuleGroupResponse>,
tonic::Status,
> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::unknown(
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/com.coralogix.rules.v1.RuleGroupsService/DeleteRuleGroup",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"com.coralogix.rules.v1.RuleGroupsService",
"DeleteRuleGroup",
),
);
self.inner.unary(req, path, codec).await
}
pub async fn bulk_delete_rule_group(
&mut self,
request: impl tonic::IntoRequest<super::BulkDeleteRuleGroupRequest>,
) -> std::result::Result<
tonic::Response<super::BulkDeleteRuleGroupResponse>,
tonic::Status,
> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::unknown(
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/com.coralogix.rules.v1.RuleGroupsService/BulkDeleteRuleGroup",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"com.coralogix.rules.v1.RuleGroupsService",
"BulkDeleteRuleGroup",
),
);
self.inner.unary(req, path, codec).await
}
pub async fn get_rule_group_model_mapping(
&mut self,
request: impl tonic::IntoRequest<super::GetRuleGroupModelMappingRequest>,
) -> std::result::Result<
tonic::Response<super::GetRuleGroupModelMappingResponse>,
tonic::Status,
> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::unknown(
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/com.coralogix.rules.v1.RuleGroupsService/GetRuleGroupModelMapping",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"com.coralogix.rules.v1.RuleGroupsService",
"GetRuleGroupModelMapping",
),
);
self.inner.unary(req, path, codec).await
}
pub async fn get_company_usage_limits(
&mut self,
request: impl tonic::IntoRequest<super::GetCompanyUsageLimitsRequest>,
) -> std::result::Result<
tonic::Response<super::GetCompanyUsageLimitsResponse>,
tonic::Status,
> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::unknown(
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/com.coralogix.rules.v1.RuleGroupsService/GetCompanyUsageLimits",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"com.coralogix.rules.v1.RuleGroupsService",
"GetCompanyUsageLimits",
),
);
self.inner.unary(req, path, codec).await
}
}
}