sentry_protos 0.25.0

Rust bindings for sentry-protos
Documentation
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
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
// This file is @generated by prost-build.
#[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,
}
/// Defines how usage data is transformed into a billable line item through arithmetic operations.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct BillableMetric {
    /// Unique identifier for the billable metric.
    #[prost(string, tag = "1")]
    pub id: ::prost::alloc::string::String,
    /// Name of the billable metric (e.g., "performance_units").
    #[prost(string, tag = "2")]
    pub name: ::prost::alloc::string::String,
    /// Expression defining how to calculate this metric from usage data.
    #[prost(message, optional, tag = "3")]
    pub expression: ::core::option::Option<Expression>,
}
/// Represents an arithmetic expression that can reference usage data categories or constants.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Expression {
    #[prost(oneof = "expression::ExpressionType", tags = "1, 2, 3")]
    pub expression_type: ::core::option::Option<expression::ExpressionType>,
}
/// Nested message and enum types in `Expression`.
pub mod expression {
    #[derive(Clone, PartialEq, ::prost::Oneof)]
    pub enum ExpressionType {
        /// Reference to a data category's usage count.
        #[prost(message, tag = "1")]
        CategoryRef(super::CategoryReference),
        /// A constant numeric value.
        #[prost(double, tag = "2")]
        Constant(f64),
        /// A binary arithmetic operation.
        #[prost(message, tag = "3")]
        BinaryOp(::prost::alloc::boxed::Box<super::BinaryOperation>),
    }
}
/// Reference to a usage data category.
#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
pub struct CategoryReference {
    #[prost(oneof = "category_reference::CategoryType", tags = "1, 2")]
    pub category_type: ::core::option::Option<category_reference::CategoryType>,
}
/// Nested message and enum types in `CategoryReference`.
pub mod category_reference {
    #[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Oneof)]
    pub enum CategoryType {
        #[prost(enumeration = "super::super::super::DataCategory", tag = "1")]
        DataCategory(i32),
        #[prost(enumeration = "super::super::super::SeatCategory", tag = "2")]
        SeatCategory(i32),
    }
}
/// A binary arithmetic operation between two expressions.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct BinaryOperation {
    /// The operator to apply.
    #[prost(enumeration = "Operator", tag = "1")]
    pub operator: i32,
    /// Left operand.
    #[prost(message, optional, boxed, tag = "2")]
    pub left: ::core::option::Option<::prost::alloc::boxed::Box<Expression>>,
    /// Right operand.
    #[prost(message, optional, boxed, tag = "3")]
    pub right: ::core::option::Option<::prost::alloc::boxed::Box<Expression>>,
}
/// Supported arithmetic operators.
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum Operator {
    Unspecified = 0,
    /// *
    Add = 1,
    /// *
    Subtract = 2,
    /// *
    Multiply = 3,
    /// /
    Divide = 4,
}
impl Operator {
    /// 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 => "OPERATOR_UNSPECIFIED",
            Self::Add => "OPERATOR_ADD",
            Self::Subtract => "OPERATOR_SUBTRACT",
            Self::Multiply => "OPERATOR_MULTIPLY",
            Self::Divide => "OPERATOR_DIVIDE",
        }
    }
    /// Creates an enum from field names used in the ProtoBuf definition.
    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
        match value {
            "OPERATOR_UNSPECIFIED" => Some(Self::Unspecified),
            "OPERATOR_ADD" => Some(Self::Add),
            "OPERATOR_SUBTRACT" => Some(Self::Subtract),
            "OPERATOR_MULTIPLY" => Some(Self::Multiply),
            "OPERATOR_DIVIDE" => Some(Self::Divide),
            _ => None,
        }
    }
}
/// Billing interval for packages and contracts.
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum BillingInterval {
    Unspecified = 0,
    Monthly = 1,
    AnnualBaseMonthlyPayg = 2,
}
impl BillingInterval {
    /// 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_INTERVAL_UNSPECIFIED",
            Self::Monthly => "BILLING_INTERVAL_MONTHLY",
            Self::AnnualBaseMonthlyPayg => "BILLING_INTERVAL_ANNUAL_BASE_MONTHLY_PAYG",
        }
    }
    /// 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_INTERVAL_UNSPECIFIED" => Some(Self::Unspecified),
            "BILLING_INTERVAL_MONTHLY" => Some(Self::Monthly),
            "BILLING_INTERVAL_ANNUAL_BASE_MONTHLY_PAYG" => {
                Some(Self::AnnualBaseMonthlyPayg)
            }
            _ => None,
        }
    }
}
#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
pub struct FlexiblePrice {
    #[prost(uint64, tag = "1")]
    pub base: u64,
    #[prost(oneof = "flexible_price::AnnualPrice", tags = "2")]
    pub annual_price: ::core::option::Option<flexible_price::AnnualPrice>,
}
/// Nested message and enum types in `FlexiblePrice`.
pub mod flexible_price {
    #[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Oneof)]
    pub enum AnnualPrice {
        #[prost(uint64, tag = "2")]
        Fixed(u64),
    }
}
/// Unit information for measurement and conversion.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct UnitInfo {
    /// Short name for the unit (e.g., "GB", "cm", "count").
    #[prost(string, tag = "1")]
    pub name: ::prost::alloc::string::String,
    /// Full descriptive name (e.g., "gigabytes", "centimeters", "count").
    #[prost(string, tag = "2")]
    pub full_name: ::prost::alloc::string::String,
    /// Base unit for conversion.
    #[prost(enumeration = "BaseUnit", tag = "3")]
    pub base_unit: i32,
    /// Multiplier to convert to base unit (e.g., 1e9 for GB to bytes).
    #[prost(double, tag = "4")]
    pub multiplier: f64,
}
/// Base unit types for measurement and conversion.
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum BaseUnit {
    Unspecified = 0,
    Byte = 1,
    Count = 2,
    Second = 3,
    Millisecond = 4,
}
impl BaseUnit {
    /// 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 => "BASE_UNIT_UNSPECIFIED",
            Self::Byte => "BASE_UNIT_BYTE",
            Self::Count => "BASE_UNIT_COUNT",
            Self::Second => "BASE_UNIT_SECOND",
            Self::Millisecond => "BASE_UNIT_MILLISECOND",
        }
    }
    /// Creates an enum from field names used in the ProtoBuf definition.
    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
        match value {
            "BASE_UNIT_UNSPECIFIED" => Some(Self::Unspecified),
            "BASE_UNIT_BYTE" => Some(Self::Byte),
            "BASE_UNIT_COUNT" => Some(Self::Count),
            "BASE_UNIT_SECOND" => Some(Self::Second),
            "BASE_UNIT_MILLISECOND" => Some(Self::Millisecond),
            _ => None,
        }
    }
}
/// Details of a SKU line item in the billing system.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct LineItemDetails {
    /// Unique identifier for the line item.
    #[prost(string, tag = "1")]
    pub uid: ::prost::alloc::string::String,
    /// Customer-facing display name for the line item.
    #[prost(string, tag = "3")]
    pub customer_facing_name: ::prost::alloc::string::String,
    /// Plural form of the customer-facing name.
    #[prost(string, tag = "4")]
    pub plural: ::prost::alloc::string::String,
    /// Unit information for measurement.
    #[prost(message, optional, tag = "5")]
    pub units: ::core::option::Option<UnitInfo>,
    /// Defines how usage data is transformed into this line item.
    #[prost(message, optional, tag = "6")]
    pub billable_metric: ::core::option::Option<BillableMetric>,
}
/// Stripe-specific payment information for an organization.
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct StripePaymentData {
    #[prost(string, optional, tag = "1")]
    pub customer_stripe_id: ::core::option::Option<::prost::alloc::string::String>,
    #[prost(string, optional, tag = "2")]
    pub default_payment_method_id: ::core::option::Option<
        ::prost::alloc::string::String,
    >,
}
/// Payment provider configuration with support for multiple providers.
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct PaymentConfig {
    #[prost(oneof = "payment_config::Config", tags = "1")]
    pub config: ::core::option::Option<payment_config::Config>,
}
/// Nested message and enum types in `PaymentConfig`.
pub mod payment_config {
    #[derive(Clone, PartialEq, Eq, Hash, ::prost::Oneof)]
    pub enum Config {
        /// Future payment providers (e.g., PayPal, Braintree) can be added here
        #[prost(message, tag = "1")]
        Stripe(super::StripePaymentData),
    }
}
/// A pending change is a deferred subscription change for an organization that
/// will apply at the next billing period rollover. Each org has at most one
/// pending change at a time. Any field left unset means that aspect of the
/// subscription is not being changed.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct PendingChange {
    /// The package the subscription will switch to. Unset means the package is
    /// not changing.
    #[prost(string, optional, tag = "1")]
    pub package_id: ::core::option::Option<::prost::alloc::string::String>,
    /// Pending PAYG-budget and reservation overrides, grouped by the set of line
    /// items they apply to. This mirrors the UserConfig shape used by the
    /// contract pricing config: each entry describes a line-item subset (or "all
    /// line items") together with its pending PAYG budget and/or reservation.
    /// Shared reserved-budget pools (e.g. Seer covering autofix + scanner +
    /// users) are represented as a single PendingUserConfig that lists every
    /// line item in the pool.
    #[prost(message, repeated, tag = "2")]
    pub user_configs: ::prost::alloc::vec::Vec<PendingUserConfig>,
    /// New contract month_interval. Used for downgrades from annual to monthly
    #[prost(uint32, optional, tag = "3")]
    pub month_interval: ::core::option::Option<u32>,
}
/// Pending overrides for a set of line items. payg_budget and reservation are
/// each independently optional - either, both, or neither may be set on a
/// given config.
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct PendingUserConfig {
    /// Pending PAYG budget for the covered line items. Unset means the PAYG
    /// budget is not changing.
    #[prost(message, optional, tag = "1")]
    pub payg_budget: ::core::option::Option<PaygBudget>,
    /// Pending reservation (price and unit count) for the covered line items.
    /// Unset means the reservation is not changing.
    #[prost(message, optional, tag = "2")]
    pub reservation: ::core::option::Option<Reservation>,
    /// The line items this config applies to.
    #[prost(oneof = "pending_user_config::LineItems", tags = "3, 4")]
    pub line_items: ::core::option::Option<pending_user_config::LineItems>,
}
/// Nested message and enum types in `PendingUserConfig`.
pub mod pending_user_config {
    /// The line items this config applies to.
    #[derive(Clone, PartialEq, Eq, Hash, ::prost::Oneof)]
    pub enum LineItems {
        /// Explicit list of line item uids (e.g. one line item, or multiple line
        /// items that share a reserved-budget pool).
        #[prost(message, tag = "3")]
        SpecificItems(super::LineItemUids),
        /// Sentinel meaning "all line items on the package." Used for top-level
        /// shared PAYG budgets.
        #[prost(message, tag = "4")]
        AllItems(()),
    }
}
#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
pub struct PaygBudget {
    #[prost(uint64, tag = "1")]
    pub budget_cents: u64,
}
#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
pub struct Reservation {
    #[prost(uint64, tag = "1")]
    pub reserved_price_cents: u64,
    #[prost(oneof = "reservation::ReservedUnits", tags = "2, 3")]
    pub reserved_units: ::core::option::Option<reservation::ReservedUnits>,
}
/// Nested message and enum types in `Reservation`.
pub mod reservation {
    #[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Oneof)]
    pub enum ReservedUnits {
        #[prost(bool, tag = "2")]
        IsUnlimited(bool),
        #[prost(uint64, tag = "3")]
        NumReservedUnits(u64),
    }
}
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct LineItemUids {
    #[prost(string, repeated, tag = "1")]
    pub uids: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
}
#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
pub struct PricingTier {
    #[prost(int64, tag = "1")]
    pub start: i64,
    #[deprecated]
    #[prost(int64, tag = "2")]
    pub end: i64,
    #[deprecated]
    #[prost(int64, tag = "3")]
    pub rate_per_unit_cpe: i64,
    #[prost(message, optional, tag = "4")]
    pub price: ::core::option::Option<FlexiblePrice>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct TieredPricingRate {
    #[prost(message, repeated, tag = "1")]
    pub tiers: ::prost::alloc::vec::Vec<PricingTier>,
}
/// Card payment method details.
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct Card {
    #[prost(string, tag = "1")]
    pub last_4: ::prost::alloc::string::String,
}
/// Provider-specific payment method information attached to a charge.
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct PaymentMethodDetails {
    #[prost(oneof = "payment_method_details::Details", tags = "1")]
    pub details: ::core::option::Option<payment_method_details::Details>,
}
/// Nested message and enum types in `PaymentMethodDetails`.
pub mod payment_method_details {
    #[derive(Clone, PartialEq, Eq, Hash, ::prost::Oneof)]
    pub enum Details {
        #[prost(message, tag = "1")]
        Card(super::Card),
    }
}
/// A snapshot of a Stripe charge object. Used as the payload when reacting
/// to Stripe webhook events.
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct StripeCharge {
    #[prost(string, tag = "1")]
    pub id: ::prost::alloc::string::String,
    #[prost(uint64, tag = "2")]
    pub amount: u64,
    #[prost(bool, tag = "3")]
    pub refunded: bool,
    #[prost(bool, tag = "4")]
    pub paid: bool,
    #[prost(uint64, tag = "5")]
    pub amount_refunded: u64,
    /// Stripe's "created" field, expressed as Unix epoch seconds.
    #[prost(int64, tag = "6")]
    pub created_st: i64,
    #[prost(string, optional, tag = "7")]
    pub failure_code: ::core::option::Option<::prost::alloc::string::String>,
    #[prost(message, optional, tag = "8")]
    pub payment_method_details: ::core::option::Option<PaymentMethodDetails>,
}