import{formats}from"@kubernetes-models/validate";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.replicas){let err0={instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty:"replicas"}};null===vErrors?vErrors=[err0]:vErrors.push(err0),errors++}void 0===data.replicas||validate22(data.replicas,{instancePath:instancePath+"/replicas",parentData:data,parentDataProperty:"replicas",rootData})||(errors=(vErrors=null===vErrors?validate22.errors:vErrors.concat(validate22.errors)).length),void 0===data.selector||validate24(data.selector,{instancePath:instancePath+"/selector",parentData:data,parentDataProperty:"selector",rootData})||(errors=(vErrors=null===vErrors?validate24.errors:vErrors.concat(validate24.errors)).length),void 0===data.targetSelector||validate28(data.targetSelector,{instancePath:instancePath+"/targetSelector",parentData:data,parentDataProperty:"targetSelector",rootData})||(errors=(vErrors=null===vErrors?validate28.errors:vErrors.concat(validate28.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};let formats0=formats.int32;function validate22(data,{instancePath="",parentData,parentDataProperty,rootData=data}={}){let vErrors=null,errors=0;if(!("number"==typeof data&&!(data%1)&&!isNaN(data)&&isFinite(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 validate22.errors=vErrors,0===errors}function validate25(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++}return validate25.errors=vErrors,0===errors}function validate24(data,{instancePath="",parentData,parentDataProperty,rootData=data}={}){let vErrors=null,errors=0;if(!(data&&"object"==typeof data&&!Array.isArray(data))&&null!==data){let err0={instancePath,schemaPath:"#/type",keyword:"type",params:{type:"object"}};null===vErrors?vErrors=[err0]:vErrors.push(err0),errors++}if(data&&"object"==typeof data&&!Array.isArray(data))for(let key0 in data)validate25(data[key0],{instancePath:instancePath+"/"+key0.replace(/~/g,"~0").replace(/\//g,"~1"),parentData:data,parentDataProperty:key0,rootData})||(errors=(vErrors=null===vErrors?validate25.errors:vErrors.concat(validate25.errors)).length);return validate24.errors=vErrors,0===errors}function validate28(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 validate28.errors=vErrors,0===errors}