@@ -133,12 +133,12 @@ func (cr *CaveatRunner) get(caveatDefName string) (*core.CaveatDefinition, *cave
133133 return caveat , deserialized , nil
134134 }
135135
136- parameterTypes , err := caveattypes .DecodeParameterTypes (cr .caveatTypeSet , caveat .ParameterTypes )
136+ parameterTypes , err := caveattypes .DecodeParameterTypes (cr .caveatTypeSet , caveat .GetParameterTypes () )
137137 if err != nil {
138138 return nil , nil , err
139139 }
140140
141- justDeserialized , err := caveats .DeserializeCaveatWithTypeSet (cr .caveatTypeSet , caveat .SerializedExpression , parameterTypes )
141+ justDeserialized , err := caveats .DeserializeCaveatWithTypeSet (cr .caveatTypeSet , caveat .GetSerializedExpression () , parameterTypes )
142142 if err != nil {
143143 return caveat , nil , err
144144 }
@@ -149,12 +149,12 @@ func (cr *CaveatRunner) get(caveatDefName string) (*core.CaveatDefinition, *cave
149149
150150func collectCaveatNames (expr * core.CaveatExpression , caveatNames * mapz.Set [string ]) {
151151 if expr .GetCaveat () != nil {
152- caveatNames .Add (expr .GetCaveat ().CaveatName )
152+ caveatNames .Add (expr .GetCaveat ().GetCaveatName () )
153153 return
154154 }
155155
156156 cop := expr .GetOperation ()
157- for _ , child := range cop .Children {
157+ for _ , child := range cop .GetChildren () {
158158 collectCaveatNames (child , caveatNames )
159159 }
160160}
@@ -170,9 +170,9 @@ func (cr *CaveatRunner) runExpressionWithCaveats(
170170 defer span .End ()
171171
172172 if expr .GetCaveat () != nil {
173- span .SetAttributes (attribute .StringSlice (otelconv .AttrCaveatsNames , []string {expr .GetCaveat ().CaveatName }))
173+ span .SetAttributes (attribute .StringSlice (otelconv .AttrCaveatsNames , []string {expr .GetCaveat ().GetCaveatName () }))
174174
175- caveat , compiled , err := cr .get (expr .GetCaveat ().CaveatName )
175+ caveat , compiled , err := cr .get (expr .GetCaveat ().GetCaveatName () )
176176 if err != nil {
177177 return nil , err
178178 }
@@ -190,7 +190,7 @@ func (cr *CaveatRunner) runExpressionWithCaveats(
190190 typedParameters , err := caveats .ConvertContextToParameters (
191191 cr .caveatTypeSet ,
192192 untypedFullContext ,
193- caveat .ParameterTypes ,
193+ caveat .GetParameterTypes () ,
194194 caveats .SkipUnknownParameters ,
195195 )
196196 if err != nil {
@@ -211,16 +211,16 @@ func (cr *CaveatRunner) runExpressionWithCaveats(
211211 }
212212
213213 cop := expr .GetOperation ()
214- span .SetAttributes (attribute .StringSlice (otelconv .AttrCaveatsOperations , []string {cop .Op .String ()}))
214+ span .SetAttributes (attribute .StringSlice (otelconv .AttrCaveatsOperations , []string {cop .GetOp () .String ()}))
215215
216216 var currentResult ExpressionResult = syntheticResult {
217- value : cop .Op == core .CaveatOperation_AND ,
217+ value : cop .GetOp () == core .CaveatOperation_AND ,
218218 isPartialResult : false ,
219219 }
220220
221221 var exprResultsForDebug []ExpressionResult
222222 if debugOption == RunCaveatExpressionWithDebugInformation {
223- exprResultsForDebug = make ([]ExpressionResult , 0 , len (cop .Children ))
223+ exprResultsForDebug = make ([]ExpressionResult , 0 , len (cop .GetChildren () ))
224224 }
225225
226226 var missingVarNames * mapz.Set [string ]
@@ -313,7 +313,7 @@ func (cr *CaveatRunner) runExpressionWithCaveats(
313313 }, nil
314314 }
315315
316- for _ , child := range cop .Children {
316+ for _ , child := range cop .GetChildren () {
317317 childResult , err := cr .runExpressionWithCaveats (ctx , env , child , context , debugOption )
318318 if err != nil {
319319 return nil , err
@@ -330,7 +330,7 @@ func (cr *CaveatRunner) runExpressionWithCaveats(
330330 missingVarNames .Extend (missingVars )
331331 }
332332
333- switch cop .Op {
333+ switch cop .GetOp () {
334334 case core .CaveatOperation_AND :
335335 cr , err := and (currentResult , childResult )
336336 if err != nil {
@@ -357,7 +357,7 @@ func (cr *CaveatRunner) runExpressionWithCaveats(
357357 return invert (childResult )
358358
359359 default :
360- return nil , spiceerrors .MustBugf ("unknown caveat operation: %v" , cop .Op )
360+ return nil , spiceerrors .MustBugf ("unknown caveat operation: %v" , cop .GetOp () )
361361 }
362362 }
363363
0 commit comments