sentry_protos 0.12.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
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
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
// 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,
    /// Remaining fields are deprecated
    #[deprecated]
    #[prost(enumeration = "BillingChannel", tag = "2")]
    pub channel: i32,
    #[deprecated]
    #[prost(enumeration = "ExternalBillingProvider", tag = "3")]
    pub external_billing_provider: i32,
    #[deprecated]
    #[prost(message, optional, tag = "4")]
    pub address: ::core::option::Option<Address>,
    /// Use PricingConfig.billing_period_start_date and PricingConfig.billing_period_end_date
    #[deprecated]
    #[prost(message, optional, tag = "5")]
    pub contract_start_date: ::core::option::Option<Date>,
    #[deprecated]
    #[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,
    /// 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>,
    #[prost(string, tag = "9")]
    pub package_uid: ::prost::alloc::string::String,
    #[deprecated]
    #[prost(uint64, tag = "8")]
    pub package_id: u64,
    /// Includes information like plan ID, tier, etc.
    #[deprecated]
    #[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>,
}
#[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, 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, PartialEq, Eq, Hash, ::prost::Message)]
pub struct UserConfig {
    #[prost(message, optional, tag = "1")]
    pub payg_budget: ::core::option::Option<PaygBudget>,
    #[prost(message, optional, tag = "2")]
    pub reservation: ::core::option::Option<Reservation>,
    #[prost(oneof = "user_config::LineItems", tags = "3, 4")]
    pub line_items: ::core::option::Option<user_config::LineItems>,
}
/// Nested message and enum types in `UserConfig`.
pub mod user_config {
    #[derive(Clone, PartialEq, Eq, Hash, ::prost::Oneof)]
    pub enum LineItems {
        #[prost(message, tag = "3")]
        SpecificItems(super::LineItemUids),
        #[prost(message, tag = "4")]
        AllItems(()),
    }
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct PricingConfig {
    /// Determines when to reset quotas and charge the subscription price.
    #[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>,
    /// 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>,
    #[prost(message, optional, tag = "9")]
    pub usage_watermark_ts: ::core::option::Option<::prost_types::Timestamp>,
    #[prost(message, repeated, tag = "10")]
    pub user_config: ::prost::alloc::vec::Vec<UserConfig>,
    /// DEPRECATED: use package instead.
    #[deprecated]
    #[prost(uint64, tag = "6")]
    pub base_price_cents: u64,
    /// DEPRECATED: use package/user_parameters instead.
    #[deprecated]
    #[prost(message, repeated, tag = "1")]
    pub sku_configs: ::prost::alloc::vec::Vec<SkuConfig>,
    /// DEPRECATED: use package/user_parameters instead.
    #[deprecated]
    #[prost(message, repeated, tag = "2")]
    pub shared_sku_budgets: ::prost::alloc::vec::Vec<SharedSkuBudget>,
    /// DEPRECATED: use user_parameters instead
    #[deprecated]
    #[prost(uint64, tag = "5")]
    pub max_spend_cents: u64,
}
#[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>,
}
/// 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,
    #[prost(uint64, tag = "4")]
    pub organization_id: u64,
    #[prost(bool, tag = "5")]
    pub paid: bool,
    #[prost(message, optional, tag = "6")]
    pub date_added: ::core::option::Option<::prost_types::Timestamp>,
    #[prost(string, tag = "7")]
    pub guid: ::prost::alloc::string::String,
    #[prost(bool, tag = "8")]
    pub needs_charged: bool,
    #[prost(message, optional, tag = "9")]
    pub address: ::core::option::Option<super::super::super::common::v1::Address>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CreateContractRequest {
    #[prost(uint64, tag = "1")]
    pub organization_id: u64,
    #[prost(string, tag = "2")]
    pub package_uid: ::prost::alloc::string::String,
    #[prost(message, repeated, tag = "3")]
    pub user_configs: ::prost::alloc::vec::Vec<UserConfig>,
    #[prost(message, repeated, tag = "4")]
    pub line_items: ::prost::alloc::vec::Vec<InvoiceLineItem>,
    #[prost(message, optional, tag = "5")]
    pub address: ::core::option::Option<super::super::super::common::v1::Address>,
}
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct CreateContractResponse {
    #[prost(uint64, tag = "1")]
    pub id: u64,
    #[prost(uint64, tag = "2")]
    pub invoice_id: u64,
    #[prost(string, tag = "3")]
    pub invoice_guid: ::prost::alloc::string::String,
    #[prost(bool, tag = "4")]
    pub needs_charge: bool,
    #[prost(uint64, tag = "5")]
    pub amount_billed: u64,
}
#[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>,
}
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct GetInvoiceRequest {
    #[prost(uint64, tag = "1")]
    pub invoice_id: u64,
    #[prost(string, tag = "2")]
    pub invoice_guid: ::prost::alloc::string::String,
    #[prost(uint64, tag = "3")]
    pub organization_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>,
}
#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
pub struct ListInvoicesRequest {
    /// Only invoices owned by this organization are returned.
    #[prost(uint64, tag = "1")]
    pub organization_id: u64,
    /// 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 and next_offset populated for the following page.
    #[prost(uint32, tag = "2")]
    pub max_items: u32,
    /// Zero-based offset into the result set. Pair with max_items to page
    /// through results.
    #[prost(uint32, optional, tag = "3")]
    pub offset: ::core::option::Option<u32>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ListInvoicesResponse {
    /// Invoices for the requested organization, ordered newest-first by
    /// date_added.
    #[prost(message, repeated, tag = "1")]
    pub invoices: ::prost::alloc::vec::Vec<Invoice>,
    /// True if additional matching invoices existed beyond max_items and were
    /// not included in this response.
    #[prost(bool, tag = "2")]
    pub truncated: bool,
    /// Offset to use in a subsequent ListInvoicesRequest to fetch the next
    /// page. Only set when truncated is true.
    #[prost(uint32, optional, tag = "3")]
    pub next_offset: ::core::option::Option<u32>,
    /// Total number of invoices matching the request, ignoring offset and
    /// max_items.
    #[prost(uint32, tag = "4")]
    pub total: u32,
}
/// Marks an invoice as paid and clears its needs_charged flag so it is no longer
/// returned by GetUnchargedInvoices.
#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
pub struct MarkInvoicePaidRequest {
    #[prost(uint64, tag = "1")]
    pub invoice_id: u64,
}
#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
pub struct MarkInvoicePaidResponse {
    /// True if a matching invoice was found and updated.
    #[prost(bool, tag = "1")]
    pub updated: bool,
}
/// Records a failed charge attempt against an invoice.
#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
pub struct RecordFailedChargeAttemptRequest {
    #[prost(uint64, tag = "1")]
    pub invoice_id: u64,
}
#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
pub struct RecordFailedChargeAttemptResponse {
    /// True if a matching invoice was found and updated.
    #[prost(bool, tag = "1")]
    pub updated: bool,
    /// Post-update attempt_count on the invoice.
    #[prost(uint32, tag = "2")]
    pub attempt_count: u32,
    /// Post-update next_payment_attempt on the invoice. Unset if the retry
    /// schedule has been exhausted and no further automatic retries will run.
    #[prost(message, optional, tag = "3")]
    pub next_payment_attempt: ::core::option::Option<::prost_types::Timestamp>,
}
/// 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>,
    #[prost(message, optional, tag = "4")]
    pub address: ::core::option::Option<super::super::super::common::v1::Address>,
}
#[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,
}