@@ -75,10 +75,9 @@ message CheckResponse {
75
75
// attributes and its configuration.
76
76
Attributes attributes = 4 [(gogoproto.nullable ) = false ];
77
77
78
- // The subset of attributes that were used in producing the result.
79
- // This includes only the attributes that were sent to Mixer and
80
- // do not include any derived attributes Mixer generated itself.
81
- UsedRequestAttributes used_attributes = 5 [(gogoproto.nullable ) = false ];
78
+ // The total set of attributes that were used in producing the result
79
+ // along with matching conditions.
80
+ ReferencedAttributes referenced_attributes = 5 [(gogoproto.nullable ) = false ];
82
81
}
83
82
84
83
message QuotaResult {
@@ -89,10 +88,9 @@ message CheckResponse {
89
88
// If `QuotaParams.best_effort` is false, this will be either 0 or >= `QuotaParams.amount`.
90
89
int64 granted_amount = 2 ;
91
90
92
- // The subset of attributes that were used in producing the result.
93
- // This includes only the attributes that were sent to Mixer and
94
- // do not include any derived attributes Mixer generated itself.
95
- UsedRequestAttributes used_attributes = 3 [(gogoproto.nullable ) = false ];
91
+ // The total set of attributes that were used in producing the result
92
+ // along with matching conditions.
93
+ ReferencedAttributes referenced_attributes = 5 [(gogoproto.nullable ) = false ];
96
94
}
97
95
98
96
// The precondition check results.
@@ -102,14 +100,14 @@ message CheckResponse {
102
100
map <string , QuotaResult > quotas = 3 [(gogoproto.nullable ) = false ];
103
101
}
104
102
105
- // Describes the attributes that were used in order to determine the response.
103
+ // Describes the attributes that were used to determine the response.
106
104
// This can be used to construct a response cache.
107
- message UsedRequestAttributes {
105
+ message ReferencedAttributes {
108
106
// How an attribute's value was matched
109
107
enum Condition {
110
- EXACT = 0 ;
111
- PREFIX = 1 ;
112
- REGEX = 2 ;
108
+ ABSENCE = 0 ; // match when attribute doesn't exist
109
+ EXACT = 1 ; // match when attribute value is an exact byte-for-byte match
110
+ REGEX = 2 ; // match when attribute value matches the included regex
113
111
}
114
112
115
113
message AttributeMatch {
@@ -129,5 +127,5 @@ message UsedRequestAttributes {
129
127
repeated string words = 1 ;
130
128
131
129
// Describes a set of attributes.
132
- repeated AttributeMatch attribute_matches = 2 ;
130
+ repeated AttributeMatch attribute_matches = 2 [ (gogoproto .nullable ) = false ] ;
133
131
}
0 commit comments