-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #143 from whdalsrnt/master
Cloud Service Report API
- Loading branch information
Showing
4 changed files
with
192 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
182 changes: 182 additions & 0 deletions
182
proto/spaceone/api/inventory/v1/cloud_service_report.proto
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,182 @@ | ||
syntax = "proto3"; | ||
|
||
package spaceone.api.inventory.v1; | ||
|
||
option go_package = "github.com/cloudforet-io/api/dist/go/spaceone/api/inventory/v1"; | ||
|
||
import "google/protobuf/empty.proto"; | ||
import "google/protobuf/struct.proto"; | ||
import "google/api/annotations.proto"; | ||
import "spaceone/api/core/v1/query.proto"; | ||
|
||
|
||
service CloudServiceReport { | ||
|
||
rpc create (CreateCloudServiceReportRequest) returns (CloudServiceReportInfo) { | ||
option (google.api.http) = { | ||
post: "/inventory/v1/cloud-service-report/create" | ||
body: "*" | ||
}; | ||
} | ||
|
||
rpc update (UpdateCloudServiceReportRequest) returns (CloudServiceReportInfo) { | ||
option (google.api.http) = { | ||
post: "/inventory/v1/cloud-service-report/update" | ||
body: "*" | ||
}; | ||
} | ||
|
||
rpc delete (CloudServiceReportRequest) returns (google.protobuf.Empty) { | ||
option (google.api.http) = { | ||
post: "/inventory/v1/cloud-service-report/delete" | ||
body: "*" | ||
}; | ||
} | ||
|
||
rpc send (CloudServiceReportRequest) returns (google.protobuf.Empty) { | ||
option (google.api.http) = { | ||
post: "/inventory/v1/cloud-service-report/send" | ||
body: "*" | ||
}; | ||
} | ||
|
||
rpc get (GetCloudServiceReportRequest) returns (CloudServiceReportInfo) { | ||
option (google.api.http) = { | ||
post: "/inventory/v1/cloud-service-report/get" | ||
body: "*" | ||
}; | ||
} | ||
|
||
rpc list (CloudServiceReportQuery) returns (CloudServiceReportsInfo) { | ||
option (google.api.http) = { | ||
post: "/inventory/v1/cloud-service-report/list" | ||
body: "*" | ||
}; | ||
} | ||
|
||
rpc stat (CloudServiceReportStatQuery) returns (google.protobuf.Struct) { | ||
option (google.api.http) = { | ||
post: "/inventory/v1/cloud-service-report/stat" | ||
body: "*" | ||
}; | ||
} | ||
} | ||
|
||
message ReportSchedule { | ||
enum ScheduleState { | ||
SCHEDULE_STATE_NONE = 0; | ||
ENABLED = 1; | ||
DISABLED = 2; | ||
} | ||
|
||
enum DayOfWeek { | ||
DAY_OF_WEEK_NONE = 0; | ||
MON = 1; | ||
TUE = 2; | ||
WED = 3; | ||
THU = 4; | ||
FRI = 5; | ||
SAT = 6; | ||
SUN = 7; | ||
} | ||
|
||
ScheduleState state = 1; | ||
repeated int32 hours = 2; | ||
repeated DayOfWeek days_of_week = 3; | ||
} | ||
|
||
message CreateCloudServiceReportRequest { | ||
enum FileFormat { | ||
NONE_FILE_FORMAT = 0; | ||
EXCEL = 1; | ||
CSV = 2; | ||
} | ||
|
||
string name = 1; | ||
repeated spaceone.api.core.v1.ExportOption options = 2; | ||
// +optional | ||
FileFormat file_format = 3; | ||
ReportSchedule schedule = 4; | ||
google.protobuf.Struct target = 5; | ||
// +optional | ||
google.protobuf.Struct tags = 11; | ||
string domain_id = 21; | ||
} | ||
|
||
|
||
message UpdateCloudServiceReportRequest { | ||
enum FileFormat { | ||
NONE_FILE_FORMAT = 0; | ||
EXCEL = 1; | ||
CSV = 2; | ||
} | ||
|
||
string report_id = 1; | ||
// +optional | ||
string name = 2; | ||
// +optional | ||
repeated spaceone.api.core.v1.ExportOption options = 3; | ||
// +optional | ||
FileFormat file_format = 4; | ||
// +optional | ||
ReportSchedule schedule = 5; | ||
// +optional | ||
google.protobuf.Struct target = 6; | ||
// +optional | ||
google.protobuf.Struct tags = 11; | ||
string domain_id = 21; | ||
} | ||
|
||
message CloudServiceReportRequest { | ||
string report_id = 1; | ||
string domain_id = 2; | ||
} | ||
|
||
message GetCloudServiceReportRequest { | ||
string report_id = 1; | ||
string domain_id = 2; | ||
// +optional | ||
repeated string only = 3; | ||
} | ||
|
||
message CloudServiceReportQuery { | ||
// +optional | ||
spaceone.api.core.v1.Query query = 1; | ||
// +optional | ||
string report_id = 2; | ||
// +optional | ||
string name = 3; | ||
string domain_id = 11; | ||
} | ||
|
||
message CloudServiceReportInfo { | ||
enum FileFormat { | ||
NONE_FILE_FORMAT = 0; | ||
EXCEL = 1; | ||
CSV = 2; | ||
} | ||
|
||
string report_id = 1; | ||
string name = 2; | ||
repeated spaceone.api.core.v1.ExportOption options = 3; | ||
FileFormat file_format = 4; | ||
ReportSchedule schedule = 5; | ||
google.protobuf.Struct target = 6; | ||
|
||
google.protobuf.Struct tags = 11; | ||
|
||
string domain_id = 21; | ||
|
||
string created_at = 31; | ||
string updated_at = 32; | ||
} | ||
|
||
message CloudServiceReportsInfo { | ||
repeated CloudServiceReportInfo results = 1; | ||
int32 total_count = 2; | ||
} | ||
|
||
message CloudServiceReportStatQuery { | ||
spaceone.api.core.v1.StatisticsQuery query = 1; | ||
string domain_id = 2; | ||
} |