"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),Object.defineProperty(exports,"validate",{enumerable:!0,get:function(){return validate}});let _validate=require("@kubernetes-models/validate"),_IoK8sApiFlowcontrolV1beta2FlowDistinguisherMethod=require("./IoK8sApiFlowcontrolV1beta2FlowDistinguisherMethod.js"),_IoK8sApiFlowcontrolV1beta2PriorityLevelConfigurationReference=require("./IoK8sApiFlowcontrolV1beta2PriorityLevelConfigurationReference.js"),_IoK8sApiFlowcontrolV1beta2PolicyRulesWithSubjects=require("./IoK8sApiFlowcontrolV1beta2PolicyRulesWithSubjects.js"),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.priorityLevelConfiguration){let err0={instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"priorityLevelConfiguration"}};null===vErrors?vErrors=[err0]:vErrors.push(err0),errors++}void 0===data.distinguisherMethod||validate22(data.distinguisherMethod,{instancePath:instancePath+"/distinguisherMethod",parentData:data,parentDataProperty:"distinguisherMethod",rootData})||(errors=(vErrors=null===vErrors?validate22.errors:vErrors.concat(validate22.errors)).length),void 0===data.matchingPrecedence||validate26(data.matchingPrecedence,{instancePath:instancePath+"/matchingPrecedence",parentData:data,parentDataProperty:"matchingPrecedence",rootData})||(errors=(vErrors=null===vErrors?validate26.errors:vErrors.concat(validate26.errors)).length),void 0===data.priorityLevelConfiguration||validate28(data.priorityLevelConfiguration,{instancePath:instancePath+"/priorityLevelConfiguration",parentData:data,parentDataProperty:"priorityLevelConfiguration",rootData})||(errors=(vErrors=null===vErrors?validate28.errors:vErrors.concat(validate28.errors)).length),void 0===data.rules||validate32(data.rules,{instancePath:instancePath+"/rules",parentData:data,parentDataProperty:"rules",rootData})||(errors=(vErrors=null===vErrors?validate32.errors:vErrors.concat(validate32.errors)).length)}else{let err1={instancePath,schemaPath:"#/type",keyword:"type",params:{type:"object"}};null===vErrors?vErrors=[err1]:vErrors.push(err1),errors++}return validate21.errors=vErrors,0===errors};function validate22(data,{instancePath="",parentData,parentDataProperty,rootData=data}={}){let vErrors=null,errors=0;return null===data||(0,_IoK8sApiFlowcontrolV1beta2FlowDistinguisherMethod.validate)(data,{instancePath,parentData,parentDataProperty,rootData})||(errors=(vErrors=null===vErrors?_IoK8sApiFlowcontrolV1beta2FlowDistinguisherMethod.validate.errors:vErrors.concat(_IoK8sApiFlowcontrolV1beta2FlowDistinguisherMethod.validate.errors)).length),validate22.errors=vErrors,0===errors}let formats0=_validate.formats.int32;function validate26(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:"int32"}};null===vErrors?vErrors=[err1]:vErrors.push(err1),errors++}return validate26.errors=vErrors,0===errors}function validate28(data,{instancePath="",parentData,parentDataProperty,rootData=data}={}){let vErrors=null,errors=0;return(0,_IoK8sApiFlowcontrolV1beta2PriorityLevelConfigurationReference.validate)(data,{instancePath,parentData,parentDataProperty,rootData})||(errors=(vErrors=null===vErrors?_IoK8sApiFlowcontrolV1beta2PriorityLevelConfigurationReference.validate.errors:vErrors.concat(_IoK8sApiFlowcontrolV1beta2PriorityLevelConfigurationReference.validate.errors)).length),validate28.errors=vErrors,0===errors}function validate33(data,{instancePath="",parentData,parentDataProperty,rootData=data}={}){let vErrors=null,errors=0;return(0,_IoK8sApiFlowcontrolV1beta2PolicyRulesWithSubjects.validate)(data,{instancePath,parentData,parentDataProperty,rootData})||(errors=(vErrors=null===vErrors?_IoK8sApiFlowcontrolV1beta2PolicyRulesWithSubjects.validate.errors:vErrors.concat(_IoK8sApiFlowcontrolV1beta2PolicyRulesWithSubjects.validate.errors)).length),validate33.errors=vErrors,0===errors}function validate32(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++)validate33(data[i0],{instancePath:instancePath+"/"+i0,parentData:data,parentDataProperty:i0,rootData})||(errors=(vErrors=null===vErrors?validate33.errors:vErrors.concat(validate33.errors)).length)}return validate32.errors=vErrors,0===errors}