Skip to content

Commit 0fd33ca

Browse files
authored
CRC-1917 | add price breakdown for quote response (#362)
* CRC-1917 | add price breakdown for quote response * chore: update breakdown field to price_per_hour
1 parent 5ca109f commit 0fd33ca

7 files changed

Lines changed: 381 additions & 111 deletions

File tree

gen/go/qdrant/cloud/booking/v1/booking.pb.go

Lines changed: 186 additions & 70 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

gen/openapiv2/qdrant/cloud/booking/v1/booking.swagger.json

Lines changed: 33 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

gen/python/qdrant/cloud/booking/v1/booking_pb2.py

Lines changed: 37 additions & 29 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

gen/python/qdrant/cloud/booking/v1/booking_pb2.pyi

Lines changed: 18 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

gen/typescript/qdrant/cloud/booking/v1/booking_pb.d.ts

Lines changed: 64 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

gen/typescript/qdrant/cloud/booking/v1/booking_pb.js

Lines changed: 17 additions & 10 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

proto/qdrant/cloud/booking/v1/booking.proto

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -368,6 +368,22 @@ message GetQuoteRequest {
368368
optional qdrant.cloud.common.v1.StorageTierType storage_tier_type = 7;
369369
}
370370

371+
// PriceBreakdown represents the price breakdown for one component of a quote.
372+
// Amounts are in the same currency as the enclosing GetQuoteResponse.
373+
message PriceBreakdown {
374+
// Pre-discount hourly total for this component, in millicents per hour across all cluster nodes.
375+
int64 original_price_per_hour = 1 [(buf.validate.field).int64.gte = 0];
376+
// Post-discount hourly total for this component, in millicents per hour across all cluster nodes.
377+
// If no discount applies to this component, this equals original_price.
378+
int64 discounted_price_per_hour = 2 [(buf.validate.field).int64.gte = 0];
379+
// Independent discount rate for this component (e.g., 10.0 for 10%).
380+
// 0.0 when no discount applies to this component.
381+
double discount_percentage = 3 [(buf.validate.field).double = {
382+
gte: 0.0
383+
lte: 100.0
384+
}];
385+
}
386+
371387
// GetQuoteResponse is the response from the GetQuote function
372388
message GetQuoteResponse {
373389
// The currency of the prices.
@@ -385,6 +401,16 @@ message GetQuoteResponse {
385401
gte: 0.0
386402
lte: 100.0
387403
}];
404+
// Hourly price breakdown for the selected package (base cluster resources).
405+
// Populated for all paid clusters; omitted for free-tier quotes.
406+
optional PriceBreakdown package = 5;
407+
// Hourly price breakdown for additional disk beyond the package default.
408+
// Populated only when GetQuoteRequest.additional_disk_gib is greater than zero.
409+
optional PriceBreakdown extra_disk = 6;
410+
// Hourly price breakdown for the selected storage performance tier (disk speed).
411+
// Populated only when the quote uses a tier other than cost-optimised
412+
// (`STORAGE_TIER_TYPE_BALANCED`, `STORAGE_TIER_TYPE_PERFORMANCE`, etc.).
413+
optional PriceBreakdown disk_speed = 7;
388414
}
389415

390416
// GetBackupQuoteRequest is the request for the GetBackupQuote function

0 commit comments

Comments
 (0)