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
// 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)
#[deprecated]
#[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,
>,
/// 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,
>,
/// Whether this LineItem is included in the base package or not (ie Seer)
#[prost(bool, tag = "8")]
pub is_optional_add_on: bool,
/// Used for calculating spend that should not apply towards an organization's PAYG budget (ie Seer seats)
#[prost(message, optional, tag = "9")]
pub uncapped_rate: ::core::option::Option<
super::super::super::common::v1::TieredPricingRate,
>,
/// 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,
>,
/// How many units are available for a PackageConfig during a subscription trial? For packages that are not eligible for trials,
/// this field will be unset for all line items.
#[prost(oneof = "line_item_config::TrialUnits", tags = "10, 11")]
pub trial_units: ::core::option::Option<line_item_config::TrialUnits>,
}
/// 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),
}
/// How many units are available for a PackageConfig during a subscription trial? For packages that are not eligible for trials,
/// this field will be unset for all line items.
#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Oneof)]
pub enum TrialUnits {
#[prost(bool, tag = "10")]
IsUnlimitedTrial(bool),
#[prost(uint64, tag = "11")]
NumTrialUnits(u64),
}
}
/// 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)
///
/// DEPRECATED: Use reserved_tier
#[deprecated]
#[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,
>,
/// Whether this LineItem is included in the base package or not (ie Seer)
#[prost(bool, tag = "4")]
pub is_optional_add_on: bool,
/// The unique line item details used when invoicing this shared pool.
#[prost(message, optional, tag = "5")]
pub shared_line_item: ::core::option::Option<
super::super::super::common::v1::LineItemDetails,
>,
/// Cost of the shared line item pool, in cents(a customer can pay $X and get $Y of credit, where X!=Y).
///
/// DEPRECATED: Use reserved_tier
#[deprecated]
#[prost(uint64, tag = "6")]
pub base_price_cents: u64,
/// DEPRECATED: Use reserved_tier
#[deprecated]
#[prost(message, optional, tag = "7")]
pub flexible_base_price_cents: ::core::option::Option<
super::super::super::common::v1::FlexiblePrice,
>,
/// Similar to LineItemConfig.reserved_rate, this field will hold the list of available reserved tiers for this line item
/// as well as the prices for each respective tier.
#[prost(message, optional, tag = "8")]
pub reserved_tier: ::core::option::Option<
super::super::super::common::v1::TieredPricingRate,
>,
/// How many units are available for a PackageConfig during a subscription trial? For packages that are not eligible for trials,
/// this field will be unset for all line items.
#[prost(oneof = "shared_line_item_pool::TrialUnits", tags = "9, 10")]
pub trial_units: ::core::option::Option<shared_line_item_pool::TrialUnits>,
}
/// Nested message and enum types in `SharedLineItemPool`.
pub mod shared_line_item_pool {
/// How many units are available for a PackageConfig during a subscription trial? For packages that are not eligible for trials,
/// this field will be unset for all line items.
#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Oneof)]
pub enum TrialUnits {
#[prost(bool, tag = "9")]
IsUnlimitedTrial(bool),
#[prost(uint64, tag = "10")]
NumTrialUnits(u64),
}
}
#[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.
#[deprecated]
#[prost(uint64, tag = "4")]
pub base_price_cents: u64,
#[prost(message, optional, tag = "8")]
pub flexible_base_price_cents: ::core::option::Option<
super::super::super::common::v1::FlexiblePrice,
>,
/// Deprecated. Use supported_month_intervals.
#[deprecated]
#[prost(enumeration = "super::super::super::common::v1::BillingInterval", tag = "5")]
pub billing_interval: i32,
#[prost(string, tag = "6")]
pub title: ::prost::alloc::string::String,
/// Number-of-months billing intervals this package offers.
/// \[1\] = monthly only, \[1, 12\] = monthly or annual, \[12\] = annual only.
#[prost(uint32, repeated, tag = "7")]
pub supported_month_intervals: ::prost::alloc::vec::Vec<u32>,
/// Title shown in admin interfaces, not customer-facing.
#[prost(string, tag = "9")]
pub admin_title: ::prost::alloc::string::String,
/// Whether the package is treated as enterprise in the UI (display name,
/// upsell suppression).
#[prost(bool, tag = "10")]
pub is_enterprise: bool,
/// Whether the package can be chosen in the self-serve checkout flow.
#[prost(bool, tag = "11")]
pub user_selectable: bool,
/// Whether the package has pay-as-you-go (PAYG) modes.
#[prost(bool, tag = "12")]
pub has_payg_modes: bool,
/// Default retention settings for this package.
/// Each entry uses a billing data category.
/// A category can occur only once.
#[prost(message, repeated, tag = "14")]
pub retention_defaults: ::prost::alloc::vec::Vec<
super::super::super::common::v1::DataCategoryRetention,
>,
}
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct GetPackageRequest {
#[prost(string, tag = "1")]
pub package_uid: ::prost::alloc::string::String,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetPackageResponse {
#[prost(message, optional, tag = "1")]
pub package_config: ::core::option::Option<PackageConfig>,
}
/// A package a customer can subscribe to, such as the Team or Business package.
/// Carries only what a catalog needs beyond a bare reference; fetch full details
/// (title, pricing, supported intervals) with GetPackage / GetPackages.
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct PackageOption {
/// Unique identifier for this package. Resolve it to full details via
/// GetPackage / GetPackages.
#[prost(string, tag = "1")]
pub uid: ::prost::alloc::string::String,
#[prost(enumeration = "AcquisitionMode", tag = "2")]
pub acquisition: i32,
}
/// The set of packages a customer can choose from — the answer to "what can I
/// move to?". Returned relative to the customer's current package, or, when no
/// current package is given, the catalog for the latest upsell.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct PackageCatalog {
/// Every package option in the catalog, in the order they should be shown.
/// Includes the free option, the package the customer is currently on (so it
/// can be highlighted in context), and enterprise options (which require
/// talking to sales, flagged via AcquisitionMode).
#[prost(message, repeated, tag = "1")]
pub packages: ::prost::alloc::vec::Vec<PackageOption>,
/// uid of the free option within `packages`. Being on it means having no paid
/// subscription — a distinct state — so it is called out for consumers that
/// treat it specially.
#[prost(string, tag = "2")]
pub free_package_uid: ::prost::alloc::string::String,
/// uid of the default option within `packages`: the one checkout pre-selects.
#[prost(string, tag = "3")]
pub default_package_uid: ::prost::alloc::string::String,
}
/// How a customer can start on a package.
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum AcquisitionMode {
Unspecified = 0,
/// customer can sign up on their own
SelfServe = 1,
}
impl AcquisitionMode {
/// 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 => "ACQUISITION_MODE_UNSPECIFIED",
Self::SelfServe => "ACQUISITION_MODE_SELF_SERVE",
}
}
/// Creates an enum from field names used in the ProtoBuf definition.
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"ACQUISITION_MODE_UNSPECIFIED" => Some(Self::Unspecified),
"ACQUISITION_MODE_SELF_SERVE" => Some(Self::SelfServe),
_ => None,
}
}
}
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct GetPackageCatalogRequest {
/// The package the customer is currently on; the catalog is returned relative
/// to it. Leave unset for a customer who has not signed up yet, in which case
/// the catalog for the latest upsell is returned.
#[prost(string, optional, tag = "1")]
pub package_uid: ::core::option::Option<::prost::alloc::string::String>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetPackageCatalogResponse {
#[prost(message, optional, tag = "1")]
pub catalog: ::core::option::Option<PackageCatalog>,
}
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct GetPackagesRequest {
/// The package uids to fetch. Accepts one or many.
#[prost(string, repeated, tag = "1")]
pub package_uids: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetPackagesResponse {
/// The requested packages, in the same order as the request.
#[prost(message, repeated, tag = "1")]
pub package_configs: ::prost::alloc::vec::Vec<PackageConfig>,
}