-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathqms_overages.proto
70 lines (53 loc) · 1.9 KB
/
qms_overages.proto
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
syntax = "proto3";
package qms;
import "header.proto";
import "svcerror.proto";
option go_package = "github.com/cyverse-de/p/go/qms";
option java_multiple_files = true;
option java_package = "org.cyverse.de.protobufs";
option java_outer_classname = "QMSOveragesProtobufs";
/**
* Represents when a user's resource type usage exceeds their configured
* quota. Usually embedded in request and response message types.
*/
message Overage {
// The type of resource that is in overage. Usually data.size of cpu.hours.
string resource_name = 1 [json_name = "resource_name"];
// The configured quota value for the resource type.
double quota = 2;
// The actual usage value for the resource type.
double usage = 3;
}
/**
* Returned by handlers in response to overage requests.
*/
message OverageResponse {
// The header used for passing telemetry data.
header.Header header = 1;
// Contains any errors generated by the handler emitting the response.
svcerror.ServiceError error = 2;
// The overage returned by the handler emitting the response.
Overage overage = 3;
}
/**
* A response message returned by handlers in response to overage related requests.
*/
message OverageList {
// The header used for passing telemetry data.
header.Header header = 1;
// Contains any errors generated by the handler emitting the response.
svcerror.ServiceError error = 2;
// The list of overages returned by the handler emitting the response.
repeated Overage overages = 3;
}
/**
* A response message returned by handlers in response to overage related requests.
*/
message IsOverage {
// The header userd for passing telemetry data.
header.Header header = 1;
// Contains any errors generated by the handler emitting the response.
svcerror.ServiceError error = 2;
// Whether or not there is an overage.
bool is_overage = 3 [json_name = "is_overage"];
}