#[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, ::prost::Message)]
pub struct BillableMetric {
#[prost(string, tag = "1")]
pub id: ::prost::alloc::string::String,
#[prost(string, tag = "2")]
pub name: ::prost::alloc::string::String,
#[prost(message, optional, tag = "3")]
pub expression: ::core::option::Option<Expression>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Expression {
#[prost(oneof = "expression::ExpressionType", tags = "1, 2, 3")]
pub expression_type: ::core::option::Option<expression::ExpressionType>,
}
pub mod expression {
#[derive(Clone, PartialEq, ::prost::Oneof)]
pub enum ExpressionType {
#[prost(message, tag = "1")]
CategoryRef(super::CategoryReference),
#[prost(double, tag = "2")]
Constant(f64),
#[prost(message, tag = "3")]
BinaryOp(::prost::alloc::boxed::Box<super::BinaryOperation>),
}
}
#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
pub struct CategoryReference {
#[prost(oneof = "category_reference::CategoryType", tags = "1, 2")]
pub category_type: ::core::option::Option<category_reference::CategoryType>,
}
pub mod category_reference {
#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Oneof)]
pub enum CategoryType {
#[prost(enumeration = "super::super::super::DataCategory", tag = "1")]
DataCategory(i32),
#[prost(enumeration = "super::super::super::SeatCategory", tag = "2")]
SeatCategory(i32),
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct BinaryOperation {
#[prost(enumeration = "Operator", tag = "1")]
pub operator: i32,
#[prost(message, optional, boxed, tag = "2")]
pub left: ::core::option::Option<::prost::alloc::boxed::Box<Expression>>,
#[prost(message, optional, boxed, tag = "3")]
pub right: ::core::option::Option<::prost::alloc::boxed::Box<Expression>>,
}
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum Operator {
Unspecified = 0,
Add = 1,
Subtract = 2,
Multiply = 3,
Divide = 4,
}
impl Operator {
pub fn as_str_name(&self) -> &'static str {
match self {
Self::Unspecified => "OPERATOR_UNSPECIFIED",
Self::Add => "OPERATOR_ADD",
Self::Subtract => "OPERATOR_SUBTRACT",
Self::Multiply => "OPERATOR_MULTIPLY",
Self::Divide => "OPERATOR_DIVIDE",
}
}
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"OPERATOR_UNSPECIFIED" => Some(Self::Unspecified),
"OPERATOR_ADD" => Some(Self::Add),
"OPERATOR_SUBTRACT" => Some(Self::Subtract),
"OPERATOR_MULTIPLY" => Some(Self::Multiply),
"OPERATOR_DIVIDE" => Some(Self::Divide),
_ => None,
}
}
}
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum BillingInterval {
Unspecified = 0,
Monthly = 1,
AnnualBaseMonthlyPayg = 2,
}
impl BillingInterval {
pub fn as_str_name(&self) -> &'static str {
match self {
Self::Unspecified => "BILLING_INTERVAL_UNSPECIFIED",
Self::Monthly => "BILLING_INTERVAL_MONTHLY",
Self::AnnualBaseMonthlyPayg => "BILLING_INTERVAL_ANNUAL_BASE_MONTHLY_PAYG",
}
}
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"BILLING_INTERVAL_UNSPECIFIED" => Some(Self::Unspecified),
"BILLING_INTERVAL_MONTHLY" => Some(Self::Monthly),
"BILLING_INTERVAL_ANNUAL_BASE_MONTHLY_PAYG" => {
Some(Self::AnnualBaseMonthlyPayg)
}
_ => None,
}
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct UnitInfo {
#[prost(string, tag = "1")]
pub name: ::prost::alloc::string::String,
#[prost(string, tag = "2")]
pub full_name: ::prost::alloc::string::String,
#[prost(enumeration = "BaseUnit", tag = "3")]
pub base_unit: i32,
#[prost(double, tag = "4")]
pub multiplier: f64,
}
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum BaseUnit {
Unspecified = 0,
Byte = 1,
Count = 2,
Second = 3,
Millisecond = 4,
}
impl BaseUnit {
pub fn as_str_name(&self) -> &'static str {
match self {
Self::Unspecified => "BASE_UNIT_UNSPECIFIED",
Self::Byte => "BASE_UNIT_BYTE",
Self::Count => "BASE_UNIT_COUNT",
Self::Second => "BASE_UNIT_SECOND",
Self::Millisecond => "BASE_UNIT_MILLISECOND",
}
}
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"BASE_UNIT_UNSPECIFIED" => Some(Self::Unspecified),
"BASE_UNIT_BYTE" => Some(Self::Byte),
"BASE_UNIT_COUNT" => Some(Self::Count),
"BASE_UNIT_SECOND" => Some(Self::Second),
"BASE_UNIT_MILLISECOND" => Some(Self::Millisecond),
_ => None,
}
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct LineItemDetails {
#[prost(string, tag = "1")]
pub uid: ::prost::alloc::string::String,
#[prost(string, tag = "3")]
pub customer_facing_name: ::prost::alloc::string::String,
#[prost(string, tag = "4")]
pub plural: ::prost::alloc::string::String,
#[prost(message, optional, tag = "5")]
pub units: ::core::option::Option<UnitInfo>,
#[prost(message, optional, tag = "6")]
pub billable_metric: ::core::option::Option<BillableMetric>,
}
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct StripePaymentData {
#[prost(string, optional, tag = "1")]
pub customer_stripe_id: ::core::option::Option<::prost::alloc::string::String>,
#[prost(string, optional, tag = "2")]
pub default_payment_method_id: ::core::option::Option<
::prost::alloc::string::String,
>,
}
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct PaymentConfig {
#[prost(oneof = "payment_config::Config", tags = "1")]
pub config: ::core::option::Option<payment_config::Config>,
}
pub mod payment_config {
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Oneof)]
pub enum Config {
#[prost(message, tag = "1")]
Stripe(super::StripePaymentData),
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct PendingChange {
#[prost(string, optional, tag = "1")]
pub package_id: ::core::option::Option<::prost::alloc::string::String>,
#[prost(message, repeated, tag = "2")]
pub user_configs: ::prost::alloc::vec::Vec<PendingUserConfig>,
#[prost(uint32, optional, tag = "3")]
pub month_interval: ::core::option::Option<u32>,
}
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct PendingUserConfig {
#[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 = "pending_user_config::LineItems", tags = "3, 4")]
pub line_items: ::core::option::Option<pending_user_config::LineItems>,
}
pub mod pending_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, 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>,
}
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, 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, Eq, Hash, ::prost::Message)]
pub struct Card {
#[prost(string, tag = "1")]
pub last_4: ::prost::alloc::string::String,
}
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct PaymentMethodDetails {
#[prost(oneof = "payment_method_details::Details", tags = "1")]
pub details: ::core::option::Option<payment_method_details::Details>,
}
pub mod payment_method_details {
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Oneof)]
pub enum Details {
#[prost(message, tag = "1")]
Card(super::Card),
}
}
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct StripeCharge {
#[prost(string, tag = "1")]
pub id: ::prost::alloc::string::String,
#[prost(uint64, tag = "2")]
pub amount: u64,
#[prost(bool, tag = "3")]
pub refunded: bool,
#[prost(bool, tag = "4")]
pub paid: bool,
#[prost(uint64, tag = "5")]
pub amount_refunded: u64,
#[prost(int64, tag = "6")]
pub created_st: i64,
#[prost(string, optional, tag = "7")]
pub failure_code: ::core::option::Option<::prost::alloc::string::String>,
#[prost(message, optional, tag = "8")]
pub payment_method_details: ::core::option::Option<PaymentMethodDetails>,
}