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: 2 additions & 0 deletions proto/spaceone/api/cost_analysis/v1/cost_report_config.proto
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,7 @@ message CreateCostReportConfigRequest {
SCOPE_NONE = 0;
WORKSPACE = 1;
PROJECT = 2;
SERVICE_ACCOUNT = 3;
}
Scope scope = 1;
// +optional
Expand Down Expand Up @@ -175,6 +176,7 @@ message CostReportConfigInfo {
SCOPE_NONE = 0;
WORKSPACE = 1;
PROJECT = 2;
SERVICE_ACCOUNT = 3;
}

// The ID of cost report in the Protocol.
Expand Down
10 changes: 5 additions & 5 deletions proto/spaceone/api/cost_analysis/v1/report_adjustment.proto
Original file line number Diff line number Diff line change
Expand Up @@ -55,15 +55,15 @@ service ReportAdjustment {

}

enum AdjustmentMethod {
METHOD_NONE = 0;
enum AdjustmentUnit {
UNIT_NONE = 0;
FIXED = 1;
PERCENTAGE = 2;
}

message CreateReportAdjustmentRequest {
string name = 1;
AdjustmentMethod method = 2;
AdjustmentUnit unit = 2;
float value = 3;
// +optional
string description = 4;
Expand All @@ -83,7 +83,7 @@ message UpdateReportAdjustmentRequest {
// +optional
string name = 2;
// +optional
AdjustmentMethod method = 3;
AdjustmentUnit unit = 3;
// +optional
float value = 4;
// +optional
Expand Down Expand Up @@ -117,7 +117,7 @@ message ReportAdjustmentQuery {
message ReportAdjustmentInfo {
string report_adjustment_id = 1;
string name = 2;
AdjustmentMethod method = 3;
AdjustmentUnit unit = 3;
float value = 4;
string description = 5;
string provider = 6;
Expand Down
45 changes: 26 additions & 19 deletions proto/spaceone/api/cost_analysis/v1/report_adjustment_policy.proto
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,13 @@ service ReportAdjustmentPolicy {
};
}

rpc sync_currency (ReportAdjustmentPolicyRequest) returns (ReportAdjustmentPolicyInfo) {
Copy link

Copilot AI May 21, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Using a generic ReportAdjustmentPolicyRequest for the new sync_currency RPC may obscure which fields are required. Define a dedicated SyncCurrencyRequest message with explicit parameters to improve clarity.

Suggested change
rpc sync_currency (ReportAdjustmentPolicyRequest) returns (ReportAdjustmentPolicyInfo) {
rpc sync_currency (SyncCurrencyRequest) returns (ReportAdjustmentPolicyInfo) {

Copilot uses AI. Check for mistakes.
option (google.api.http) = {
post: "/cost-analysis/v1/report-adjustment-policy/sync-currency"
body: "*"
};
}

rpc get (ReportAdjustmentPolicyRequest) returns (ReportAdjustmentPolicyInfo) {
option (google.api.http) = {
post: "/cost-analysis/v1/report-adjustment-policy/get",
Expand All @@ -65,26 +72,27 @@ message CreateReportAdjustmentPolicyRequest {
SCOPE_NONE = 0;
WORKSPACE = 1;
PROJECT = 2;
SERVICE_ACCOUNT = 3;
}
string name = 1;
Scope scope = 2;
string cost_report_config_id = 3;
Scope scope = 1;
string cost_report_config_id = 2;
// +optional
int32 order = 4;
int32 order = 3;
// +optional
google.protobuf.Struct tags = 6;
string description = 4;
Copy link

Copilot AI May 21, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The 'description' field is intended to be optional but lacks a '+optional' annotation. Add '+optional' to align with other fields and improve readability.

Copilot uses AI. Check for mistakes.
// +optional
AdjustmentPolicyFilter policy_filter = 7;
google.protobuf.Struct tags = 5;
// +optional
AdjustmentPolicyFilter policy_filter = 6;
}

message UpdateReportAdjustmentPolicyRequest {
string report_adjustment_policy_id = 1;
// +optional
string name = 2;
string description = 2;
google.protobuf.Struct tags = 3;
// +optional
google.protobuf.Struct tags = 6;
// +optional
AdjustmentPolicyFilter policy_filter = 7;
AdjustmentPolicyFilter policy_filter = 4;
}

message ChangeOrderReportAdjustmentPolicyRequest {
Expand All @@ -100,25 +108,24 @@ message ReportAdjustmentPolicyQuery {
// +optional
spaceone.api.core.v2.Query query = 1;
// +optional
string name = 2;
// +optional
AdjustmentPolicyFilter policy_filter = 4;
AdjustmentPolicyFilter policy_filter = 2;
}

message ReportAdjustmentPolicyInfo {
enum Scope {
SCOPE_NONE = 0;
WORKSPACE = 1;
PROJECT = 2;
SERVICE_ACCOUNT = 3;
}

string report_adjustment_policy_id = 1;
string name = 2;
repeated string adjustments = 4;
Scope scope = 5;
int32 order = 6;
google.protobuf.Struct tags = 7;
AdjustmentPolicyFilter policy_filter = 8;
repeated string adjustments = 2;
Scope scope = 3;
int32 order = 4;
string description = 5;
google.protobuf.Struct tags = 6;
AdjustmentPolicyFilter policy_filter = 7;
string domain_id = 21;
string cost_report_config_id = 22;

Expand Down
Loading