sentry_protos 0.8.11

Rust bindings for sentry-protos
Documentation
// This file is @generated by prost-build.
#[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, PartialEq, Eq, Hash, ::prost::Message)]
pub struct Address {
    #[prost(string, tag = "1")]
    pub city: ::prost::alloc::string::String,
    #[prost(string, tag = "2")]
    pub region: ::prost::alloc::string::String,
    #[prost(string, tag = "3")]
    pub country_code: ::prost::alloc::string::String,
    #[prost(string, tag = "4")]
    pub postal_code: ::prost::alloc::string::String,
    #[prost(string, tag = "5")]
    pub address_line_1: ::prost::alloc::string::String,
    #[prost(string, tag = "6")]
    pub address_line_2: ::prost::alloc::string::String,
    #[prost(string, tag = "7")]
    pub address_line_3: ::prost::alloc::string::String,
}
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct BillingConfig {
    #[prost(enumeration = "BillingType", tag = "1")]
    pub billing_type: i32,
    #[prost(enumeration = "BillingChannel", tag = "2")]
    pub channel: i32,
    #[prost(enumeration = "ExternalBillingProvider", tag = "3")]
    pub external_billing_provider: i32,
    #[prost(message, optional, tag = "4")]
    pub address: ::core::option::Option<Address>,
    /// Determines when to charge for base package price / subscription fee.
    #[prost(message, optional, tag = "5")]
    pub contract_start_date: ::core::option::Option<Date>,
    #[prost(message, optional, tag = "6")]
    pub contract_end_date: ::core::option::Option<Date>,
}
/// Indicates how the account is billed.
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum BillingType {
    Unspecified = 0,
    Invoiced = 1,
    CreditCard = 2,
    Partner = 3,
}
impl BillingType {
    /// 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 => "BILLING_TYPE_UNSPECIFIED",
            Self::Invoiced => "BILLING_TYPE_INVOICED",
            Self::CreditCard => "BILLING_TYPE_CREDIT_CARD",
            Self::Partner => "BILLING_TYPE_PARTNER",
        }
    }
    /// Creates an enum from field names used in the ProtoBuf definition.
    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
        match value {
            "BILLING_TYPE_UNSPECIFIED" => Some(Self::Unspecified),
            "BILLING_TYPE_INVOICED" => Some(Self::Invoiced),
            "BILLING_TYPE_CREDIT_CARD" => Some(Self::CreditCard),
            "BILLING_TYPE_PARTNER" => Some(Self::Partner),
            _ => None,
        }
    }
}
/// The channel through which the contract is billed.
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum BillingChannel {
    Unspecified = 0,
    SelfServe = 1,
    Sales = 2,
    Partner = 3,
}
impl BillingChannel {
    /// 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 => "BILLING_CHANNEL_UNSPECIFIED",
            Self::SelfServe => "BILLING_CHANNEL_SELF_SERVE",
            Self::Sales => "BILLING_CHANNEL_SALES",
            Self::Partner => "BILLING_CHANNEL_PARTNER",
        }
    }
    /// Creates an enum from field names used in the ProtoBuf definition.
    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
        match value {
            "BILLING_CHANNEL_UNSPECIFIED" => Some(Self::Unspecified),
            "BILLING_CHANNEL_SELF_SERVE" => Some(Self::SelfServe),
            "BILLING_CHANNEL_SALES" => Some(Self::Sales),
            "BILLING_CHANNEL_PARTNER" => Some(Self::Partner),
            _ => None,
        }
    }
}
/// The external billing provider used to process payments for the contract.
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum ExternalBillingProvider {
    Unspecified = 0,
    Stripe = 1,
    Vercel = 2,
}
impl ExternalBillingProvider {
    /// 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 => "EXTERNAL_BILLING_PROVIDER_UNSPECIFIED",
            Self::Stripe => "EXTERNAL_BILLING_PROVIDER_STRIPE",
            Self::Vercel => "EXTERNAL_BILLING_PROVIDER_VERCEL",
        }
    }
    /// Creates an enum from field names used in the ProtoBuf definition.
    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
        match value {
            "EXTERNAL_BILLING_PROVIDER_UNSPECIFIED" => Some(Self::Unspecified),
            "EXTERNAL_BILLING_PROVIDER_STRIPE" => Some(Self::Stripe),
            "EXTERNAL_BILLING_PROVIDER_VERCEL" => Some(Self::Vercel),
            _ => None,
        }
    }
}
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct OptionValue {
    #[prost(oneof = "option_value::Value", tags = "1, 2, 3")]
    pub value: ::core::option::Option<option_value::Value>,
}
/// Nested message and enum types in `OptionValue`.
pub mod option_value {
    #[derive(Clone, PartialEq, Eq, Hash, ::prost::Oneof)]
    pub enum Value {
        #[prost(string, tag = "1")]
        StringValue(::prost::alloc::string::String),
        #[prost(int64, tag = "2")]
        IntValue(i64),
        #[prost(bool, tag = "3")]
        BoolValue(bool),
    }
}
#[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>,
}
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct MetadataOption {
    #[prost(string, tag = "1")]
    pub key: ::prost::alloc::string::String,
    #[prost(message, optional, tag = "2")]
    pub value: ::core::option::Option<OptionValue>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct MetadataOptions {
    #[prost(message, repeated, tag = "1")]
    pub options: ::prost::alloc::vec::Vec<MetadataOption>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ContractMetadata {
    #[prost(uint64, tag = "1")]
    pub id: u64,
    #[prost(uint64, tag = "2")]
    pub organization_id: u64,
    /// The set of BillingRules that the BillingRulesEngine has to execute for this contract.
    #[prost(string, tag = "3")]
    pub ruleset_version: ::prost::alloc::string::String,
    /// Includes information like plan ID, tier, etc.
    #[prost(message, optional, tag = "4")]
    pub package_metadata: ::core::option::Option<MetadataOptions>,
    /// Entitlements, used in frontend features or gating access to certain features.
    ///
    /// DEPRECATED: use billing_features instead
    #[deprecated]
    #[prost(message, optional, tag = "5")]
    pub features: ::core::option::Option<FeatureOptions>,
    /// Catch-all for overrides and information not covered above.
    #[prost(message, optional, tag = "6")]
    pub custom_options: ::core::option::Option<MetadataOptions>,
    #[prost(message, optional, tag = "7")]
    pub billing_features: ::core::option::Option<super::super::super::FeatureOptions>,
}
#[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,
        }
    }
}
#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
pub struct PricingTier {
    #[prost(int64, tag = "1")]
    pub start: i64,
    #[prost(int64, tag = "2")]
    pub end: i64,
    #[prost(int64, tag = "3")]
    pub rate_per_unit_cpe: i64,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct TieredPricingRate {
    #[prost(message, repeated, tag = "1")]
    pub tiers: ::prost::alloc::vec::Vec<PricingTier>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct SkuConfig {
    /// DEPRECATED: use billing_sku instead
    #[deprecated]
    #[prost(enumeration = "Sku", tag = "1")]
    pub sku: i32,
    /// Base price for the SKU (upgraded reserved volumes or add-on activation fees)
    #[prost(uint64, tag = "2")]
    pub base_price_cents: u64,
    #[prost(uint64, optional, tag = "3")]
    pub payg_budget_cents: ::core::option::Option<u64>,
    /// DEPRECATED: use signed reserved_units instead for support for unlimited/reserved budget categories
    #[deprecated]
    #[prost(uint64, tag = "4")]
    pub reserved_volume: u64,
    #[prost(message, optional, tag = "5")]
    pub payg_rate: ::core::option::Option<TieredPricingRate>,
    /// for reserved budget SKUs
    #[prost(message, optional, tag = "6")]
    pub reserved_rate: ::core::option::Option<TieredPricingRate>,
    #[prost(enumeration = "super::super::super::Sku", tag = "9")]
    pub billing_sku: i32,
    #[prost(oneof = "sku_config::ReservedUnits", tags = "7, 8")]
    pub reserved_units: ::core::option::Option<sku_config::ReservedUnits>,
}
/// Nested message and enum types in `SKUConfig`.
pub mod sku_config {
    #[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Oneof)]
    pub enum ReservedUnits {
        #[prost(bool, tag = "7")]
        IsUnlimited(bool),
        /// the type communicates whether the SKU is unlimited or not, additionally reserved budget SKUs have a non-zero reserved_rate in addition to 0 reserved_units
        #[prost(uint64, tag = "8")]
        NumReservedUnits(u64),
    }
}
/// Represents a budget that is collectively used by one or more SKUs,
/// allowing multiple SKUs to draw from the same reserved budget.
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct SharedSkuBudget {
    /// DEPRECATED: use billing_skus instead
    #[deprecated]
    #[prost(enumeration = "Sku", repeated, packed = "false", tag = "1")]
    pub skus: ::prost::alloc::vec::Vec<i32>,
    #[prost(uint64, tag = "2")]
    pub reserved_budget_cents: u64,
    #[prost(uint64, tag = "3")]
    pub payg_budget_cents: u64,
    #[prost(enumeration = "super::super::super::Sku", repeated, tag = "4")]
    pub billing_skus: ::prost::alloc::vec::Vec<i32>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct PricingConfig {
    #[prost(message, repeated, tag = "1")]
    pub sku_configs: ::prost::alloc::vec::Vec<SkuConfig>,
    #[prost(message, repeated, tag = "2")]
    pub shared_sku_budgets: ::prost::alloc::vec::Vec<SharedSkuBudget>,
    /// Determines when to reset quotas and create an invoice.
    #[prost(message, optional, tag = "3")]
    pub billing_period_start_date: ::core::option::Option<Date>,
    #[prost(message, optional, tag = "4")]
    pub billing_period_end_date: ::core::option::Option<Date>,
    #[prost(uint64, tag = "5")]
    pub max_spend_cents: u64,
    /// Base price for the package.
    #[prost(uint64, tag = "6")]
    pub base_price_cents: u64,
    /// Determines when the on demand period for invoicing the organization starts and ends, even for annual plans we bill ondemand monthly
    #[prost(message, optional, tag = "7")]
    pub ondemand_period_start_date: ::core::option::Option<Date>,
    #[prost(message, optional, tag = "8")]
    pub ondemand_period_end_date: ::core::option::Option<Date>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Contract {
    #[prost(message, optional, tag = "1")]
    pub metadata: ::core::option::Option<ContractMetadata>,
    #[prost(message, optional, tag = "2")]
    pub billing_config: ::core::option::Option<BillingConfig>,
    #[prost(message, optional, tag = "3")]
    pub pricing_config: ::core::option::Option<PricingConfig>,
}
#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
pub struct GetContractRequest {
    #[prost(uint64, tag = "1")]
    pub organization_id: u64,
    /// If provided, returns the Contract active on this date. Otherwise, returns the current Contract.
    #[prost(message, optional, tag = "2")]
    pub date: ::core::option::Option<super::super::super::Date>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetContractResponse {
    #[prost(message, optional, tag = "1")]
    pub contract: ::core::option::Option<Contract>,
}