sentry_protos 0.8.18

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
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
// 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, Copy, PartialEq, Eq, Hash, ::prost::Message)]
pub struct GetSpecificContractRequest {
    #[prost(uint64, tag = "1")]
    pub contract_id: u64,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetContractResponse {
    #[prost(message, optional, tag = "1")]
    pub contract: ::core::option::Option<Contract>,
}
/// This is not the same as LineItemDetails, it includes
/// items not related to the package such as tax.
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct InvoiceLineItem {
    /// Intentionally not a uint (some line items could be discounts)
    #[prost(int64, tag = "1")]
    pub amount_cents: i64,
    #[prost(string, optional, tag = "2")]
    pub description: ::core::option::Option<::prost::alloc::string::String>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Invoice {
    #[prost(uint64, tag = "1")]
    pub invoice_id: u64,
    #[prost(message, repeated, tag = "2")]
    pub line_items: ::prost::alloc::vec::Vec<InvoiceLineItem>,
    /// Not just a sum of line items since there may be credit applied
    #[prost(uint64, tag = "3")]
    pub amount_billed: u64,
}
#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
pub struct GetInvoiceRequest {
    #[prost(uint64, tag = "1")]
    pub invoice_id: u64,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetInvoiceResponse {
    #[prost(message, optional, tag = "1")]
    pub invoice: ::core::option::Option<Invoice>,
}
#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
pub struct GetUnchargedInvoicesRequest {
    /// Returns Invoices whose current billing period ends before this time and
    /// have not yet been charged for the current period.
    #[prost(message, optional, tag = "1")]
    pub current_ts: ::core::option::Option<::prost_types::Timestamp>,
    /// Maximum number of invoices to return in the response. If more invoices
    /// match the request than this limit, the response will have truncated set
    /// to true.
    #[prost(uint32, tag = "2")]
    pub max_items: u32,
    #[prost(uint32, optional, tag = "3")]
    pub offset: ::core::option::Option<u32>,
}
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct GetUnchargedInvoicesResponse {
    #[prost(uint64, repeated, tag = "1")]
    pub invoice_ids: ::prost::alloc::vec::Vec<u64>,
    /// True if additional matching invoices existed beyond max_items and were
    /// not included in this response.
    #[prost(bool, tag = "2")]
    pub truncated: bool,
}
#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
pub struct GetUninvoicedContractsRequest {
    /// Returns Contracts whose current billing period ends before this time and
    /// have not yet been invoiced for the current period.
    #[prost(message, optional, tag = "1")]
    pub current_ts: ::core::option::Option<::prost_types::Timestamp>,
    /// Maximum number of contracts to return in the response. If more contracts
    /// match the request than this limit, the response will have truncated set
    /// to true.
    #[prost(uint32, tag = "2")]
    pub max_items: u32,
    #[prost(uint32, optional, tag = "3")]
    pub offset: ::core::option::Option<u32>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetUninvoicedContractsResponse {
    /// DEPRECATED: use contract_ids instead
    #[deprecated]
    #[prost(message, repeated, tag = "1")]
    pub contracts: ::prost::alloc::vec::Vec<Contract>,
    /// True if additional matching contracts existed beyond max_items and were
    /// not included in this response.
    #[prost(bool, tag = "2")]
    pub truncated: bool,
    #[prost(uint64, repeated, tag = "3")]
    pub contract_ids: ::prost::alloc::vec::Vec<u64>,
}
/// Creates a new contract for a new billing period. Closes out the current contract by
/// creating an invoice and setting the last usage date
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct RolloverContractRequest {
    #[prost(uint64, tag = "1")]
    pub contract_id: u64,
    #[prost(message, optional, tag = "2")]
    pub last_usage_ts: ::core::option::Option<::prost_types::Timestamp>,
    #[prost(message, repeated, tag = "3")]
    pub line_items: ::prost::alloc::vec::Vec<InvoiceLineItem>,
}
#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
pub struct RolloverContractResponse {
    #[prost(uint64, tag = "1")]
    pub invoice_id: u64,
    #[prost(bool, tag = "2")]
    pub needs_charge: bool,
    #[prost(uint64, tag = "3")]
    pub amount_billed: u64,
}