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
51 changes: 51 additions & 0 deletions gc/v1/gc.proto
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ syntax = "proto3";
package blueapi.gc.v1;

import "google/api/annotations.proto";
import "google/api/field_behavior.proto";
import "google/protobuf/struct.proto";
import "protoc-gen-openapiv2/options/annotations.proto";

Expand Down Expand Up @@ -61,6 +62,24 @@ service GuaranteedCommitments {
};
}

// ####################### REPORTS #######################

// Reads monthly commitment reports for the MSP. Only available in Ripple.
rpc ReadCommitmentReports(ReadCommitmentReportsRequest) returns (stream CommitmentReport) {
option (google.api.http) = {
post: "/v1/reports/invoice:read"
body: "*"
};
}

// Reads per-account commitment report details for a specific month. Only available in Ripple.
rpc ReadCommitmentReportAccounts(ReadCommitmentReportAccountsRequest) returns (stream CommitmentReportAccount) {
option (google.api.http) = {
post: "/v1/reports/invoice/{month}/accounts:read"
body: "*"
};
}

// ####################### METRICS #######################

// WORK-IN-PROGRESS: Do not use. Retrieves key performance metrics for cloud commitments.
Expand Down Expand Up @@ -458,6 +477,13 @@ message GetCommitmentsUtilizationRequest {
string commitmentId = 1;
}

message ReadCommitmentReportsRequest {}

message ReadCommitmentReportAccountsRequest {
// Required. The billing month. Format: `yyyymm`.
string month = 1 [(google.api.field_behavior) = REQUIRED];
}

message GetMetricsRequest {
Provider provider = 1;
}
Expand Down Expand Up @@ -1162,6 +1188,31 @@ message CommitmentsUtilizationResponse {
repeated CommitmentsUtilizationData data = 1;
}

message CommitmentReport {
string month = 1;
double billUnadjusted = 2;
double billOptimized = 3;
double grossSavings = 4;
double riskPremium = 5;
double rebates = 6;
double netSavings = 7;
double revenueShare = 8;
double revenueShareRate = 9;
}

message CommitmentReportAccount {
string billingGroupId = 1;
string billingGroupName = 2;
string accountId = 3;
string accountName = 4;
string cloud = 5;
double grossSavings = 6;
double riskPremium = 7;
double rebates = 8;
double netSavings = 9;
double revenueShare = 10;
}

message MetricsResponse {
double lifetimeSavings = 1;
double mtdSavings = 2;
Expand Down
Loading
Loading