-
-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathsentry_protos.billing.v1.services.package.v1.rs
More file actions
79 lines (79 loc) · 3.67 KB
/
sentry_protos.billing.v1.services.package.v1.rs
File metadata and controls
79 lines (79 loc) · 3.67 KB
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
// This file is @generated by prost-build.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct LineItemConfig {
/// Base price for the line item (upgraded reserved volumes or add-on activation fees)
#[prost(uint64, tag = "1")]
pub base_price_cents: u64,
#[prost(message, optional, tag = "3")]
pub payg_rate: ::core::option::Option<
super::super::super::common::v1::TieredPricingRate,
>,
/// DEPRECATED: use reserved_pricing instead
///
/// for reserved budget line items
#[prost(message, optional, tag = "4")]
pub reserved_rate: ::core::option::Option<
super::super::super::common::v1::TieredPricingRate,
>,
#[prost(message, optional, tag = "7")]
pub line_item: ::core::option::Option<
super::super::super::common::v1::LineItemDetails,
>,
/// how many of this lineitem are included in the package, the customer can reserve more on their contract
#[prost(oneof = "line_item_config::IncludedReservedUnits", tags = "5, 6")]
pub included_reserved_units: ::core::option::Option<
line_item_config::IncludedReservedUnits,
>,
#[prost(oneof = "line_item_config::ReservedPricing", tags = "8, 9")]
pub reserved_pricing: ::core::option::Option<line_item_config::ReservedPricing>,
}
/// Nested message and enum types in `LineItemConfig`.
pub mod line_item_config {
/// how many of this lineitem are included in the package, the customer can reserve more on their contract
#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Oneof)]
pub enum IncludedReservedUnits {
#[prost(bool, tag = "5")]
IsUnlimited(bool),
/// the type communicates whether the line item is unlimited or not, additionally reserved budget line items have a non-zero reserved_rate in addition to 0 reserved_units
#[prost(uint64, tag = "6")]
NumReservedUnits(u64),
}
#[derive(Clone, PartialEq, ::prost::Oneof)]
pub enum ReservedPricing {
/// Used to calculate spend against reserved_pool_cents for shared line items
#[prost(message, tag = "8")]
ReservedPricingRate(super::super::super::super::common::v1::TieredPricingRate),
/// Used to determine prices for distinct reserved tiers (ie 100K errors is $X / month)
#[prost(message, tag = "9")]
ReservedTiers(super::super::super::super::common::v1::FixedTierList),
}
}
/// Represents a budget included in a package that is collectively used by one or more line items,
/// allowing multiple line items to draw from the same reserved budget.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct SharedLineItemPool {
/// how much money this shared pool has. For example, if logs costs $1.00 per GB and metrics
/// costs $1.00 per GB and we wanted to give metrics and logs a shared 5GB pool, the reserved_pool_cents
/// would be 500 ($5)
#[prost(uint64, tag = "1")]
pub reserved_pool_cents: u64,
#[prost(message, repeated, tag = "3")]
pub line_items: ::prost::alloc::vec::Vec<
super::super::super::common::v1::LineItemDetails,
>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct PackageConfig {
#[prost(string, tag = "1")]
pub uid: ::prost::alloc::string::String,
#[prost(message, repeated, tag = "2")]
pub line_item_configs: ::prost::alloc::vec::Vec<LineItemConfig>,
#[prost(message, repeated, tag = "3")]
pub shared_line_item_pools: ::prost::alloc::vec::Vec<SharedLineItemPool>,
/// Base price for the package.
#[prost(uint64, tag = "4")]
pub base_price_cents: u64,
/// Billing interval for this package.
#[prost(enumeration = "super::super::super::common::v1::BillingInterval", tag = "5")]
pub billing_interval: i32,
}