-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathqms_usages.proto
72 lines (53 loc) · 1.98 KB
/
qms_usages.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
71
72
syntax = "proto3";
package qms;
import "google/protobuf/timestamp.proto";
import "header.proto";
import "svcerror.proto";
import "qms_resource_types.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 = "QMSUsageProtobufs";
/**
* A representation of how much a user has used a resource type.
*/
message Usage {
// The unique identifier
string uuid = 1;
// How much the resource has been used.
double usage = 2;
// The unique identifier for the subscription the usage is associated with.
string subscription_id = 3 [json_name = "subscription_id"];
// The resource type the usage applies to.
ResourceType resource_type = 4 [json_name = "resource_type"];
// Who created the usage record. Probably not the name of a user.
string CreatedBy = 5 [json_name = "created_by"];
// When the usage record was created.
google.protobuf.Timestamp CreatedAt = 6 [json_name = "created_at"];
// Who last modified the usage record. Probably not the name of a user.
string LastModifiedBy = 7 [json_name = "last_modified_by"];
// When the usage record was last modified.
google.protobuf.Timestamp LastModifiedAt = 8 [json_name = "last_modified_at"];
}
/**
* A response to a request for a usage record.
*/
message UsageResponse {
// Contains telemetry information
header.Header header = 1;
// Error information returned by the request handler.
svcerror.ServiceError error = 2;
// Contains the usage info returned by the request handler.
Usage usage = 3;
}
/**
* A response to a request for usage info containing multiple usage records.
*/
message UsageList {
// Contains telemetry information
header.Header header = 1;
// Error information returned by the request handler.
svcerror.ServiceError error = 2;
// A list of usages returned by the request handler.
repeated Usage usages = 3;
}