Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,13 @@ package sentry_protos.billing.v1.services.rate_card.v1;
import "sentry_protos/billing/v1/common/v1/line_item_details.proto";
import "sentry_protos/billing/v1/common/v1/pricing_tier.proto";

message ProjectSpendAllocation {
uint64 project_id = 1;

// Reserved line-item units assigned exclusively to this project
uint64 quantity = 2;
}

message RateCardLineItem {
sentry_protos.billing.v1.common.v1.LineItemDetails line_item_detail = 1;

Expand All @@ -20,6 +27,8 @@ message RateCardLineItem {

// Whether this line item is currently enabled
bool is_enabled = 7;

repeated ProjectSpendAllocation project_spend_allocations = 8;
}

message SharedRateCardLineItem {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,17 @@ message LineItemUsageSummary {
bool has_remaining_capacity = 8;
}

message ProjectSpendAllocationSummary {
uint64 project_id = 1;
string line_item_uid = 2;

// Reserved units assigned exclusively to this project
uint64 allocated_quantity = 3;

// Amount of allocated quantity consumed by this project
uint64 consumed_quantity = 4;
}

message SharedLineItemUsageSummary {
// Net cents consumed across all SKUs in this shared budget (after credits/trials applied).
uint64 payg_spend_cents = 1;
Expand Down Expand Up @@ -114,4 +125,6 @@ message UsagePricerResponse {
repeated SharedLineItemUsageSummary shared_line_item_summaries = 4;

google.protobuf.Timestamp last_usage_ts = 5;

repeated ProjectSpendAllocationSummary project_spend_allocation_summaries = 6;
}
10 changes: 10 additions & 0 deletions rust/src/sentry_protos.billing.v1.services.rate_card.v1.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,12 @@
// This file is @generated by prost-build.
#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
pub struct ProjectSpendAllocation {
#[prost(uint64, tag = "1")]
pub project_id: u64,
/// Reserved line-item units assigned exclusively to this project
#[prost(uint64, tag = "2")]
pub quantity: u64,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct RateCardLineItem {
#[prost(message, optional, tag = "1")]
Expand All @@ -20,6 +28,8 @@ pub struct RateCardLineItem {
/// Whether this line item is currently enabled
#[prost(bool, tag = "7")]
pub is_enabled: bool,
#[prost(message, repeated, tag = "8")]
pub project_spend_allocations: ::prost::alloc::vec::Vec<ProjectSpendAllocation>,
/// The following values are the effective values *after* contract overrides have been resolved. If there are no
/// contract overrides, the default package values are used.
#[prost(oneof = "rate_card_line_item::ReservedUnits", tags = "2, 3")]
Expand Down
17 changes: 17 additions & 0 deletions rust/src/sentry_protos.billing.v1.services.usage_pricer.v1.rs
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,19 @@ pub struct LineItemUsageSummary {
#[prost(bool, tag = "8")]
pub has_remaining_capacity: bool,
}
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct ProjectSpendAllocationSummary {
#[prost(uint64, tag = "1")]
pub project_id: u64,
#[prost(string, tag = "2")]
pub line_item_uid: ::prost::alloc::string::String,
/// Reserved units assigned exclusively to this project
#[prost(uint64, tag = "3")]
pub allocated_quantity: u64,
/// Amount of allocated quantity consumed by this project
#[prost(uint64, tag = "4")]
pub consumed_quantity: u64,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct SharedLineItemUsageSummary {
/// Net cents consumed across all SKUs in this shared budget (after credits/trials applied).
Expand Down Expand Up @@ -175,4 +188,8 @@ pub struct UsagePricerResponse {
pub shared_line_item_summaries: ::prost::alloc::vec::Vec<SharedLineItemUsageSummary>,
#[prost(message, optional, tag = "5")]
pub last_usage_ts: ::core::option::Option<::prost_types::Timestamp>,
#[prost(message, repeated, tag = "6")]
pub project_spend_allocation_summaries: ::prost::alloc::vec::Vec<
ProjectSpendAllocationSummary,
>,
}
Loading