Skip to content
Merged
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 @@ -76,8 +76,16 @@ message Reservation {
// Represents how much of the total reserved amount is allocated to a specific project
// for a given line item.
message SpendAllocation {
// A checkout operation on the allocation. The default sets the allocation to
// quantity. A contract never stores CHANGE_REMOVE. It is a request to delete the
// project's allocation, and quantity is ignored.
enum Change {
CHANGE_UNSPECIFIED = 0;
CHANGE_REMOVE = 1;
}
uint64 quantity = 1;
uint64 project_id = 2;
Change change = 3;
}

// Allows usage beyond a reservation without PAYG charges.
Expand Down
44 changes: 44 additions & 0 deletions rust/src/sentry_protos.billing.v1.services.contract.v1.rs
Original file line number Diff line number Diff line change
Expand Up @@ -421,6 +421,50 @@ pub struct SpendAllocation {
pub quantity: u64,
#[prost(uint64, tag = "2")]
pub project_id: u64,
#[prost(enumeration = "spend_allocation::Change", tag = "3")]
pub change: i32,
}
/// Nested message and enum types in `SpendAllocation`.
pub mod spend_allocation {
/// A checkout operation on the allocation. The default sets the allocation to
/// quantity. A contract never stores CHANGE_REMOVE. It is a request to delete the
/// project's allocation, and quantity is ignored.
#[derive(
Clone,
Copy,
Debug,
PartialEq,
Eq,
Hash,
PartialOrd,
Ord,
::prost::Enumeration
)]
#[repr(i32)]
pub enum Change {
Unspecified = 0,
Remove = 1,
}
impl Change {
/// 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 => "CHANGE_UNSPECIFIED",
Self::Remove => "CHANGE_REMOVE",
}
}
/// Creates an enum from field names used in the ProtoBuf definition.
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"CHANGE_UNSPECIFIED" => Some(Self::Unspecified),
"CHANGE_REMOVE" => Some(Self::Remove),
_ => None,
}
}
}
}
/// Allows usage beyond a reservation without PAYG charges.
#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
Expand Down
Loading