Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add MetricExample APIs #319

Merged
merged 2 commits into from
Apr 24, 2024
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
126 changes: 126 additions & 0 deletions proto/spaceone/api/inventory/v1/metric_example.proto
Original file line number Diff line number Diff line change
@@ -0,0 +1,126 @@
syntax = "proto3";

package spaceone.api.inventory.v1;

import "google/protobuf/empty.proto";
import "google/protobuf/struct.proto";
import "google/api/annotations.proto";
import "spaceone/api/core/v2/query.proto";

option go_package = "github.com/cloudforet-io/api/dist/go/spaceone/api/inventory/v1";

service MetricExample {
rpc create (CreateMetricExampleRequest) returns (MetricExampleInfo) {
option (google.api.http) = {
post: "/inventory/v1/metric-example/create"
body: "*"
};
}

rpc update (UpdateMetricExampleRequest) returns (MetricExampleInfo) {
option (google.api.http) = {
post: "/inventory/v1/metric-example/update"
body: "*"
};
}

rpc delete (MetricExampleRequest) returns (google.protobuf.Empty) {
option (google.api.http) = {
post: "/inventory/v1/metric-example/delete"
body: "*"
};
}

rpc get (MetricExampleRequest) returns (MetricExampleInfo) {
option (google.api.http) = {
post: "/inventory/v1/metric-example/get"
body: "*"
};
}

rpc list (MetricExampleQuery) returns (MetricExamplesInfo) {
option (google.api.http) = {
post: "/inventory/v1/metric-example/list"
body: "*"
};
}

rpc stat (MetricExampleStatQuery) returns (google.protobuf.Struct) {
option (google.api.http) = {
post: "/inventory/v1/metric-example/stat"
body: "*"
};
}
}

//{
//
//}
message CreateMetricExampleRequest {
string metric_id = 1;
// +optional
string name = 2;
google.protobuf.Struct options = 3;
// +optional
google.protobuf.Struct tags = 4;
}

//{
//
//}
message UpdateMetricExampleRequest {
string example_id = 1;
// +optional
string name = 2;
// +optional
google.protobuf.Struct options = 3;
// +optional
google.protobuf.Struct tags = 4;
}

//{
//
//}
message MetricExampleRequest {
string example_id = 1;
}

//{
//
//}
message MetricExampleQuery {
// +optional
spaceone.api.core.v2.Query query = 1;
// +optional
string example_id = 2;
// +optional
string name = 3;
// +optional
string metric_id = 4;
}

//{
//
//}
message MetricExampleInfo {
string example_id = 1;
string name = 2;
google.protobuf.Struct options = 3;
google.protobuf.Struct tags = 4;

string domain_id = 21;
string user_id = 22;
string metric_id = 23;

string created_at = 31;
string updated_at = 32;
}

message MetricExamplesInfo {
repeated MetricExampleInfo results = 1;
int32 total_count = 2;
}

message MetricExampleStatQuery {
spaceone.api.core.v2.StatisticsQuery query = 1;
}
13 changes: 9 additions & 4 deletions proto/spaceone/api/inventory/v1/namespace.proto
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,9 @@ message CreateNamespaceRequest {
// +optional
string provider = 4;
// +optional
google.protobuf.Struct tags = 5;
string icon = 5;
// +optional
google.protobuf.Struct tags = 6;
}

//{
Expand All @@ -75,7 +77,9 @@ message UpdateNamespaceRequest {
// +optional
string name = 2;
// +optional
google.protobuf.Struct tags = 3;
string icon = 3;
// +optional
google.protobuf.Struct tags = 4;
}

//{
Expand Down Expand Up @@ -111,8 +115,9 @@ message NamespaceInfo {
string name = 2;
string category = 3;
string provider = 4;
google.protobuf.Struct tags = 5;
bool is_managed = 6;
string icon = 5;
google.protobuf.Struct tags = 6;
bool is_managed = 7;

string domain_id = 21;

Expand Down
Loading