export const validate=function validate21(data,{instancePath="",parentData,parentDataProperty,rootData=data}={}){let vErrors=null,errors=0;if(data&&"object"==typeof data&&!Array.isArray(data)){if(void 0===data.apiVersion){let err0={instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"apiVersion"}};null===vErrors?vErrors=[err0]:vErrors.push(err0),errors++}if(void 0===data.kind){let err1={instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"kind"}};null===vErrors?vErrors=[err1]:vErrors.push(err1),errors++}void 0===data.aggregationRule||validate22(data.aggregationRule,{instancePath:instancePath+"/aggregationRule",parentData:data,parentDataProperty:"aggregationRule",rootData})||(errors=(vErrors=null===vErrors?validate22.errors:vErrors.concat(validate22.errors)).length),void 0===data.apiVersion||validate26(data.apiVersion,{instancePath:instancePath+"/apiVersion",parentData:data,parentDataProperty:"apiVersion",rootData})||(errors=(vErrors=null===vErrors?validate26.errors:vErrors.concat(validate26.errors)).length),void 0===data.kind||validate28(data.kind,{instancePath:instancePath+"/kind",parentData:data,parentDataProperty:"kind",rootData})||(errors=(vErrors=null===vErrors?validate28.errors:vErrors.concat(validate28.errors)).length),void 0===data.metadata||validate30(data.metadata,{instancePath:instancePath+"/metadata",parentData:data,parentDataProperty:"metadata",rootData})||(errors=(vErrors=null===vErrors?validate30.errors:vErrors.concat(validate30.errors)).length),void 0===data.rules||validate34(data.rules,{instancePath:instancePath+"/rules",parentData:data,parentDataProperty:"rules",rootData})||(errors=(vErrors=null===vErrors?validate34.errors:vErrors.concat(validate34.errors)).length)}else{let err2={instancePath,schemaPath:"#/type",keyword:"type",params:{type:"object"}};null===vErrors?vErrors=[err2]:vErrors.push(err2),errors++}return validate21.errors=vErrors,0===errors};import{validate as validate23}from"./IoK8sApiRbacV1beta1AggregationRule.mjs";function validate22(data,{instancePath="",parentData,parentDataProperty,rootData=data}={}){let vErrors=null,errors=0;return null===data||validate23(data,{instancePath,parentData,parentDataProperty,rootData})||(errors=(vErrors=null===vErrors?validate23.errors:vErrors.concat(validate23.errors)).length),validate22.errors=vErrors,0===errors}let schema9={enum:["rbac.authorization.k8s.io/v1beta1"]};function validate26(data,{instancePath="",parentData,parentDataProperty,rootData=data}={}){let vErrors=null,errors=0;if("string"!=typeof data){let err0={instancePath,schemaPath:"#/type",keyword:"type",params:{type:"string"}};null===vErrors?vErrors=[err0]:vErrors.push(err0),errors++}if("rbac.authorization.k8s.io/v1beta1"!==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 schema10={enum:["ClusterRole"]};function validate28(data,{instancePath="",parentData,parentDataProperty,rootData=data}={}){let vErrors=null,errors=0;if("string"!=typeof data){let err0={instancePath,schemaPath:"#/type",keyword:"type",params:{type:"string"}};null===vErrors?vErrors=[err0]:vErrors.push(err0),errors++}if("ClusterRole"!==data){let err1={instancePath,schemaPath:"#/enum",keyword:"enum",params:{allowedValues:schema10.enum}};null===vErrors?vErrors=[err1]:vErrors.push(err1),errors++}return validate28.errors=vErrors,0===errors}import{validate as validate31}from"@kubernetes-models/apimachinery/_schemas/IoK8sApimachineryPkgApisMetaV1ObjectMeta";function validate30(data,{instancePath="",parentData,parentDataProperty,rootData=data}={}){let vErrors=null,errors=0;return null===data||validate31(data,{instancePath,parentData,parentDataProperty,rootData})||(errors=(vErrors=null===vErrors?validate31.errors:vErrors.concat(validate31.errors)).length),validate30.errors=vErrors,0===errors}import{validate as validate36}from"./IoK8sApiRbacV1beta1PolicyRule.mjs";function validate35(data,{instancePath="",parentData,parentDataProperty,rootData=data}={}){let vErrors=null,errors=0;return validate36(data,{instancePath,parentData,parentDataProperty,rootData})||(errors=(vErrors=null===vErrors?validate36.errors:vErrors.concat(validate36.errors)).length),validate35.errors=vErrors,0===errors}function validate34(data,{instancePath="",parentData,parentDataProperty,rootData=data}={}){let vErrors=null,errors=0;if(!Array.isArray(data)&&null!==data){let err0={instancePath,schemaPath:"#/type",keyword:"type",params:{type:"array"}};null===vErrors?vErrors=[err0]:vErrors.push(err0),errors++}if(Array.isArray(data)){let len0=data.length;for(let i0=0;i0<len0;i0++)validate35(data[i0],{instancePath:instancePath+"/"+i0,parentData:data,parentDataProperty:i0,rootData})||(errors=(vErrors=null===vErrors?validate35.errors:vErrors.concat(validate35.errors)).length)}return validate34.errors=vErrors,0===errors}