sentry_protos 0.8.26

Rust bindings for sentry-protos
Documentation
// This file is @generated by prost-build.
/// Classifies the type of data being tracked.
/// Only types that we track usage of should be included here, not to be confused
/// with DataCategory in relay, or in sentry, which may include other types that
/// we don’t track for usage.
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum DataCategory {
    /// Reserved and unused.
    Unspecified = 0,
    /// Error events and Events with an event_type not explicitly listed below.
    Error = 1,
    /// Transaction events.
    Transaction = 2,
    /// An attachment. Quantity is the size of the attachment in bytes.
    Attachment = 3,
    /// Processed profiles (all profiles, whether or not we store them).
    Profile = 4,
    /// Session Replays.
    Replay = 5,
    /// Monitor check-ins.
    Monitor = 6,
    /// Spans from which we extracted metrics.
    Span = 7,
    /// User Feedback (UserReportV2).
    UserReportV2 = 8,
    /// Milliseconds per indexed profile chunk, excluding UI profile chunks.
    ProfileDuration = 9,
    /// Log event total bytes.
    LogByte = 10,
    /// Profile duration of a UI profile (milliseconds per indexed UI profile chunk).
    ProfileDurationUi = 11,
    /// Seer Autofix run events.
    SeerAutofix = 12,
    /// Seer Scanner run events.
    SeerScanner = 13,
    /// Size analysis of preprod build artifacts.
    SizeAnalysis = 14,
    /// Installable build artifact uploads.
    InstallableBuild = 15,
    /// Trace metric items.
    TraceMetric = 16,
    /// Default events.
    Default = 17,
    /// Security events.
    Security = 18,
    /// Profile chunks.
    ProfileChunk = 19,
    /// UI profile chunks.
    ProfileChunkUi = 20,
    /// Spans stored in full (indexed).
    SpanIndexed = 21,
    /// Processed transaction events.
    TransactionProcessed = 22,
    /// Indexed transaction events.
    TransactionIndexed = 23,
    /// Indexed profiles.
    ProfileIndexed = 24,
    /// Metric buckets.
    MetricBucket = 25,
    /// Individual attachment items.
    AttachmentItem = 26,
    /// Individual log items.
    LogItem = 27,
    /// Backend profile events.
    ProfileBackend = 30,
    /// UI profile events.
    ProfileUi = 31,
    /// Trace metric bytes.
    TraceMetricByte = 32,
    /// Any other data category not known by this version.
    Unknown = -1,
}
impl DataCategory {
    /// 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 {
            Self::Unspecified => "DATA_CATEGORY_UNSPECIFIED",
            Self::Error => "DATA_CATEGORY_ERROR",
            Self::Transaction => "DATA_CATEGORY_TRANSACTION",
            Self::Attachment => "DATA_CATEGORY_ATTACHMENT",
            Self::Profile => "DATA_CATEGORY_PROFILE",
            Self::Replay => "DATA_CATEGORY_REPLAY",
            Self::Monitor => "DATA_CATEGORY_MONITOR",
            Self::Span => "DATA_CATEGORY_SPAN",
            Self::UserReportV2 => "DATA_CATEGORY_USER_REPORT_V2",
            Self::ProfileDuration => "DATA_CATEGORY_PROFILE_DURATION",
            Self::LogByte => "DATA_CATEGORY_LOG_BYTE",
            Self::ProfileDurationUi => "DATA_CATEGORY_PROFILE_DURATION_UI",
            Self::SeerAutofix => "DATA_CATEGORY_SEER_AUTOFIX",
            Self::SeerScanner => "DATA_CATEGORY_SEER_SCANNER",
            Self::SizeAnalysis => "DATA_CATEGORY_SIZE_ANALYSIS",
            Self::InstallableBuild => "DATA_CATEGORY_INSTALLABLE_BUILD",
            Self::TraceMetric => "DATA_CATEGORY_TRACE_METRIC",
            Self::Default => "DATA_CATEGORY_DEFAULT",
            Self::Security => "DATA_CATEGORY_SECURITY",
            Self::ProfileChunk => "DATA_CATEGORY_PROFILE_CHUNK",
            Self::ProfileChunkUi => "DATA_CATEGORY_PROFILE_CHUNK_UI",
            Self::SpanIndexed => "DATA_CATEGORY_SPAN_INDEXED",
            Self::TransactionProcessed => "DATA_CATEGORY_TRANSACTION_PROCESSED",
            Self::TransactionIndexed => "DATA_CATEGORY_TRANSACTION_INDEXED",
            Self::ProfileIndexed => "DATA_CATEGORY_PROFILE_INDEXED",
            Self::MetricBucket => "DATA_CATEGORY_METRIC_BUCKET",
            Self::AttachmentItem => "DATA_CATEGORY_ATTACHMENT_ITEM",
            Self::LogItem => "DATA_CATEGORY_LOG_ITEM",
            Self::ProfileBackend => "DATA_CATEGORY_PROFILE_BACKEND",
            Self::ProfileUi => "DATA_CATEGORY_PROFILE_UI",
            Self::TraceMetricByte => "DATA_CATEGORY_TRACE_METRIC_BYTE",
            Self::Unknown => "DATA_CATEGORY_UNKNOWN",
        }
    }
    /// Creates an enum from field names used in the ProtoBuf definition.
    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
        match value {
            "DATA_CATEGORY_UNSPECIFIED" => Some(Self::Unspecified),
            "DATA_CATEGORY_ERROR" => Some(Self::Error),
            "DATA_CATEGORY_TRANSACTION" => Some(Self::Transaction),
            "DATA_CATEGORY_ATTACHMENT" => Some(Self::Attachment),
            "DATA_CATEGORY_PROFILE" => Some(Self::Profile),
            "DATA_CATEGORY_REPLAY" => Some(Self::Replay),
            "DATA_CATEGORY_MONITOR" => Some(Self::Monitor),
            "DATA_CATEGORY_SPAN" => Some(Self::Span),
            "DATA_CATEGORY_USER_REPORT_V2" => Some(Self::UserReportV2),
            "DATA_CATEGORY_PROFILE_DURATION" => Some(Self::ProfileDuration),
            "DATA_CATEGORY_LOG_BYTE" => Some(Self::LogByte),
            "DATA_CATEGORY_PROFILE_DURATION_UI" => Some(Self::ProfileDurationUi),
            "DATA_CATEGORY_SEER_AUTOFIX" => Some(Self::SeerAutofix),
            "DATA_CATEGORY_SEER_SCANNER" => Some(Self::SeerScanner),
            "DATA_CATEGORY_SIZE_ANALYSIS" => Some(Self::SizeAnalysis),
            "DATA_CATEGORY_INSTALLABLE_BUILD" => Some(Self::InstallableBuild),
            "DATA_CATEGORY_TRACE_METRIC" => Some(Self::TraceMetric),
            "DATA_CATEGORY_DEFAULT" => Some(Self::Default),
            "DATA_CATEGORY_SECURITY" => Some(Self::Security),
            "DATA_CATEGORY_PROFILE_CHUNK" => Some(Self::ProfileChunk),
            "DATA_CATEGORY_PROFILE_CHUNK_UI" => Some(Self::ProfileChunkUi),
            "DATA_CATEGORY_SPAN_INDEXED" => Some(Self::SpanIndexed),
            "DATA_CATEGORY_TRANSACTION_PROCESSED" => Some(Self::TransactionProcessed),
            "DATA_CATEGORY_TRANSACTION_INDEXED" => Some(Self::TransactionIndexed),
            "DATA_CATEGORY_PROFILE_INDEXED" => Some(Self::ProfileIndexed),
            "DATA_CATEGORY_METRIC_BUCKET" => Some(Self::MetricBucket),
            "DATA_CATEGORY_ATTACHMENT_ITEM" => Some(Self::AttachmentItem),
            "DATA_CATEGORY_LOG_ITEM" => Some(Self::LogItem),
            "DATA_CATEGORY_PROFILE_BACKEND" => Some(Self::ProfileBackend),
            "DATA_CATEGORY_PROFILE_UI" => Some(Self::ProfileUi),
            "DATA_CATEGORY_TRACE_METRIC_BYTE" => Some(Self::TraceMetricByte),
            "DATA_CATEGORY_UNKNOWN" => Some(Self::Unknown),
            _ => None,
        }
    }
}
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum SeatCategory {
    Unspecified = 0,
    Monitor = 1,
    Uptime = 2,
    SeerUser = 3,
}
impl SeatCategory {
    /// 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 {
            Self::Unspecified => "SEAT_CATEGORY_UNSPECIFIED",
            Self::Monitor => "SEAT_CATEGORY_MONITOR",
            Self::Uptime => "SEAT_CATEGORY_UPTIME",
            Self::SeerUser => "SEAT_CATEGORY_SEER_USER",
        }
    }
    /// Creates an enum from field names used in the ProtoBuf definition.
    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
        match value {
            "SEAT_CATEGORY_UNSPECIFIED" => Some(Self::Unspecified),
            "SEAT_CATEGORY_MONITOR" => Some(Self::Monitor),
            "SEAT_CATEGORY_UPTIME" => Some(Self::Uptime),
            "SEAT_CATEGORY_SEER_USER" => Some(Self::SeerUser),
            _ => None,
        }
    }
}
#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
pub struct Date {
    #[prost(uint32, tag = "1")]
    pub year: u32,
    #[prost(uint32, tag = "2")]
    pub month: u32,
    #[prost(uint32, tag = "3")]
    pub day: u32,
}
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum Sku {
    Unspecified = 0,
    Errors = 1,
    Spans = 2,
    Replays = 3,
    PerformanceUnits = 4,
    Cron = 5,
    Uptime = 6,
    Attachments = 7,
    Profiling = 8,
    ProfilingUi = 9,
    Logs = 10,
    Seer = 11,
    SizeAnalysis = 12,
    BuildDistribution = 13,
    Autofix = 14,
    Scanner = 15,
}
impl Sku {
    /// 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 {
            Self::Unspecified => "SKU_UNSPECIFIED",
            Self::Errors => "SKU_ERRORS",
            Self::Spans => "SKU_SPANS",
            Self::Replays => "SKU_REPLAYS",
            Self::PerformanceUnits => "SKU_PERFORMANCE_UNITS",
            Self::Cron => "SKU_CRON",
            Self::Uptime => "SKU_UPTIME",
            Self::Attachments => "SKU_ATTACHMENTS",
            Self::Profiling => "SKU_PROFILING",
            Self::ProfilingUi => "SKU_PROFILING_UI",
            Self::Logs => "SKU_LOGS",
            Self::Seer => "SKU_SEER",
            Self::SizeAnalysis => "SKU_SIZE_ANALYSIS",
            Self::BuildDistribution => "SKU_BUILD_DISTRIBUTION",
            Self::Autofix => "SKU_AUTOFIX",
            Self::Scanner => "SKU_SCANNER",
        }
    }
    /// Creates an enum from field names used in the ProtoBuf definition.
    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
        match value {
            "SKU_UNSPECIFIED" => Some(Self::Unspecified),
            "SKU_ERRORS" => Some(Self::Errors),
            "SKU_SPANS" => Some(Self::Spans),
            "SKU_REPLAYS" => Some(Self::Replays),
            "SKU_PERFORMANCE_UNITS" => Some(Self::PerformanceUnits),
            "SKU_CRON" => Some(Self::Cron),
            "SKU_UPTIME" => Some(Self::Uptime),
            "SKU_ATTACHMENTS" => Some(Self::Attachments),
            "SKU_PROFILING" => Some(Self::Profiling),
            "SKU_PROFILING_UI" => Some(Self::ProfilingUi),
            "SKU_LOGS" => Some(Self::Logs),
            "SKU_SEER" => Some(Self::Seer),
            "SKU_SIZE_ANALYSIS" => Some(Self::SizeAnalysis),
            "SKU_BUILD_DISTRIBUTION" => Some(Self::BuildDistribution),
            "SKU_AUTOFIX" => Some(Self::Autofix),
            "SKU_SCANNER" => Some(Self::Scanner),
            _ => None,
        }
    }
}
/// A credit granted to an organization, representing either a monetary
/// allowance (in cents) or a number of units for specific SKUs.
#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
pub struct Credit {
    #[prost(enumeration = "CreditType", tag = "1")]
    pub r#type: i32,
    /// The SKU this credit applies to.
    #[prost(enumeration = "Sku", tag = "2")]
    pub sku: i32,
    /// Amount in cents (for CENTS credits) or unit count (for UNITS credits).
    #[prost(int64, tag = "3")]
    pub amount: i64,
    #[prost(message, optional, tag = "4")]
    pub start_date: ::core::option::Option<Date>,
    #[prost(message, optional, tag = "5")]
    pub end_date: ::core::option::Option<Date>,
    #[prost(enumeration = "CreditStatus", tag = "6")]
    pub status: i32,
}
/// Whether the credit represents a cents allowance or a unit quantity.
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum CreditType {
    Unspecified = 0,
    /// A monetary allowance measured in cents.
    Cents = 1,
    /// A quantity of units for a specific SKU.
    Units = 2,
}
impl CreditType {
    /// 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 {
            Self::Unspecified => "CREDIT_TYPE_UNSPECIFIED",
            Self::Cents => "CREDIT_TYPE_CENTS",
            Self::Units => "CREDIT_TYPE_UNITS",
        }
    }
    /// Creates an enum from field names used in the ProtoBuf definition.
    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
        match value {
            "CREDIT_TYPE_UNSPECIFIED" => Some(Self::Unspecified),
            "CREDIT_TYPE_CENTS" => Some(Self::Cents),
            "CREDIT_TYPE_UNITS" => Some(Self::Units),
            _ => None,
        }
    }
}
/// The current status of a credit.
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum CreditStatus {
    Unspecified = 0,
    Active = 1,
    Inactive = 2,
}
impl CreditStatus {
    /// 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 {
            Self::Unspecified => "CREDIT_STATUS_UNSPECIFIED",
            Self::Active => "CREDIT_STATUS_ACTIVE",
            Self::Inactive => "CREDIT_STATUS_INACTIVE",
        }
    }
    /// Creates an enum from field names used in the ProtoBuf definition.
    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
        match value {
            "CREDIT_STATUS_UNSPECIFIED" => Some(Self::Unspecified),
            "CREDIT_STATUS_ACTIVE" => Some(Self::Active),
            "CREDIT_STATUS_INACTIVE" => Some(Self::Inactive),
            _ => None,
        }
    }
}
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct FeatureOption {
    #[prost(string, tag = "1")]
    pub key: ::prost::alloc::string::String,
    #[prost(bool, tag = "2")]
    pub enabled: bool,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct FeatureOptions {
    #[prost(message, repeated, tag = "1")]
    pub options: ::prost::alloc::vec::Vec<FeatureOption>,
    #[prost(message, optional, tag = "2")]
    pub start_date: ::core::option::Option<Date>,
    #[prost(message, optional, tag = "3")]
    pub end_date: ::core::option::Option<Date>,
}
/// Aggregated usage counts for a single data category.
#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
pub struct UsageData {
    #[prost(uint64, tag = "1")]
    pub total: u64,
    #[prost(uint64, tag = "2")]
    pub accepted: u64,
    #[prost(uint64, tag = "3")]
    pub dropped: u64,
    #[prost(uint64, tag = "4")]
    pub filtered: u64,
    #[prost(uint64, tag = "5")]
    pub over_quota: u64,
    #[prost(uint64, tag = "6")]
    pub spike_protection: u64,
    #[prost(uint64, tag = "7")]
    pub dynamic_sampling: u64,
}