...
1import "time"
2
3#Attributes: {
4 // A map of attribute name to its value.
5 attributes: {
6 [string]: #AttrValue
7 }
8}
9
10// The attribute value.
11#AttrValue: {}
12
13#AttrValue: {
14 // Used for values of type STRING, DNS_NAME, EMAIL_ADDRESS, and URI
15 stringValue: string @protobuf(2,name=string_value)
16} | {
17 // Used for values of type INT64
18 int64Value: int64 @protobuf(3,name=int64_value)
19} | {
20 // Used for values of type DOUBLE
21 doubleValue: float64 @protobuf(4,type=double,name=double_value)
22} | {
23 // Used for values of type BOOL
24 boolValue: bool @protobuf(5,name=bool_value)
25} | {
26 // Used for values of type BYTES
27 bytesValue: bytes @protobuf(6,name=bytes_value)
28} | {
29 // Used for values of type TIMESTAMP
30 timestampValue: time.Time @protobuf(7,type=google.protobuf.Timestamp,name=timestamp_value)
31} | {
32 // Used for values of type DURATION
33 durationValue: time.Duration @protobuf(8,type=google.protobuf.Duration,name=duration_value)
34} | {
35 // Used for values of type STRING_MAP
36 stringMapValue: #Attributes_StringMap @protobuf(9,type=StringMap,name=string_map_value)
37}
38
39#Attributes_StringMap: {
40 // Holds a set of name/value pairs.
41 entries: {
42 [string]: string
43 } @protobuf(1,type=map<string,string>)
44}
View as plain text