import{formats}from"@kubernetes-models/validate";export const validate=function validate22(data,{instancePath="",parentData,parentDataProperty,rootData=data}={}){let vErrors=null,errors=0;if(data&&"object"==typeof data&&!Array.isArray(data))void 0===data.effect||validate23(data.effect,{instancePath:instancePath+"/effect",parentData:data,parentDataProperty:"effect",rootData})||(errors=(vErrors=null===vErrors?validate23.errors:vErrors.concat(validate23.errors)).length),void 0===data.key||validate21(data.key,{instancePath:instancePath+"/key",parentData:data,parentDataProperty:"key",rootData})||(errors=(vErrors=null===vErrors?validate21.errors:vErrors.concat(validate21.errors)).length),void 0===data.operator||validate26(data.operator,{instancePath:instancePath+"/operator",parentData:data,parentDataProperty:"operator",rootData})||(errors=(vErrors=null===vErrors?validate26.errors:vErrors.concat(validate26.errors)).length),void 0===data.tolerationSeconds||validate28(data.tolerationSeconds,{instancePath:instancePath+"/tolerationSeconds",parentData:data,parentDataProperty:"tolerationSeconds",rootData})||(errors=(vErrors=null===vErrors?validate28.errors:vErrors.concat(validate28.errors)).length),void 0===data.value||validate21(data.value,{instancePath:instancePath+"/value",parentData:data,parentDataProperty:"value",rootData})||(errors=(vErrors=null===vErrors?validate21.errors:vErrors.concat(validate21.errors)).length);else{let err0={instancePath,schemaPath:"#/type",keyword:"type",params:{type:"object"}};null===vErrors?vErrors=[err0]:vErrors.push(err0),errors++}return validate22.errors=vErrors,0===errors};let schema8={enum:["NoExecute","NoSchedule","PreferNoSchedule"]};function validate23(data,{instancePath="",parentData,parentDataProperty,rootData=data}={}){let vErrors=null,errors=0;if("string"!=typeof data&&null!==data){let err0={instancePath,schemaPath:"#/type",keyword:"type",params:{type:"string"}};null===vErrors?vErrors=[err0]:vErrors.push(err0),errors++}if(!("NoExecute"===data||"NoSchedule"===data||"PreferNoSchedule"===data)){let err1={instancePath,schemaPath:"#/enum",keyword:"enum",params:{allowedValues:schema8.enum}};null===vErrors?vErrors=[err1]:vErrors.push(err1),errors++}return validate23.errors=vErrors,0===errors}function validate21(data,{instancePath="",parentData,parentDataProperty,rootData=data}={}){let vErrors=null,errors=0;if("string"!=typeof data&&null!==data){let err0={instancePath,schemaPath:"#/type",keyword:"type",params:{type:"string"}};null===vErrors?vErrors=[err0]:vErrors.push(err0),errors++}return validate21.errors=vErrors,0===errors}let schema9={enum:["Equal","Exists"]};function validate26(data,{instancePath="",parentData,parentDataProperty,rootData=data}={}){let vErrors=null,errors=0;if("string"!=typeof data&&null!==data){let err0={instancePath,schemaPath:"#/type",keyword:"type",params:{type:"string"}};null===vErrors?vErrors=[err0]:vErrors.push(err0),errors++}if(!("Equal"===data||"Exists"===data)){let err1={instancePath,schemaPath:"#/enum",keyword:"enum",params:{allowedValues:schema9.enum}};null===vErrors?vErrors=[err1]:vErrors.push(err1),errors++}return validate26.errors=vErrors,0===errors}let formats0=formats.int64;function validate28(data,{instancePath="",parentData,parentDataProperty,rootData=data}={}){let vErrors=null,errors=0;if(!("number"==typeof data&&!(data%1)&&!isNaN(data)&&isFinite(data))&&null!==data){let err0={instancePath,schemaPath:"#/type",keyword:"type",params:{type:"integer"}};null===vErrors?vErrors=[err0]:vErrors.push(err0),errors++}if("number"==typeof data&&isFinite(data)&&!formats0.validate(data)){let err1={instancePath,schemaPath:"#/format",keyword:"format",params:{format:"int64"}};null===vErrors?vErrors=[err1]:vErrors.push(err1),errors++}return validate28.errors=vErrors,0===errors}