"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),Object.defineProperty(exports,"validate",{enumerable:!0,get:function(){return validate}});let _validate=require("@kubernetes-models/validate"),_IoK8sApimachineryPkgApisMetaV1MicroTime=require("@kubernetes-models/apimachinery/_schemas/IoK8sApimachineryPkgApisMetaV1MicroTime"),validate=function validate25(data,{instancePath="",parentData,parentDataProperty,rootData=data}={}){let vErrors=null,errors=0;if(data&&"object"==typeof data&&!Array.isArray(data))void 0===data.acquireTime||validate22(data.acquireTime,{instancePath:instancePath+"/acquireTime",parentData:data,parentDataProperty:"acquireTime",rootData})||(errors=(vErrors=null===vErrors?validate22.errors:vErrors.concat(validate22.errors)).length),void 0===data.holderIdentity||validate27(data.holderIdentity,{instancePath:instancePath+"/holderIdentity",parentData:data,parentDataProperty:"holderIdentity",rootData})||(errors=(vErrors=null===vErrors?validate27.errors:vErrors.concat(validate27.errors)).length),void 0===data.leaseDurationSeconds||validate21(data.leaseDurationSeconds,{instancePath:instancePath+"/leaseDurationSeconds",parentData:data,parentDataProperty:"leaseDurationSeconds",rootData})||(errors=(vErrors=null===vErrors?validate21.errors:vErrors.concat(validate21.errors)).length),void 0===data.leaseTransitions||validate21(data.leaseTransitions,{instancePath:instancePath+"/leaseTransitions",parentData:data,parentDataProperty:"leaseTransitions",rootData})||(errors=(vErrors=null===vErrors?validate21.errors:vErrors.concat(validate21.errors)).length),void 0===data.renewTime||validate22(data.renewTime,{instancePath:instancePath+"/renewTime",parentData:data,parentDataProperty:"renewTime",rootData})||(errors=(vErrors=null===vErrors?validate22.errors:vErrors.concat(validate22.errors)).length);else{let err0={instancePath,schemaPath:"#/type",keyword:"type",params:{type:"object"}};null===vErrors?vErrors=[err0]:vErrors.push(err0),errors++}return validate25.errors=vErrors,0===errors};function validate22(data,{instancePath="",parentData,parentDataProperty,rootData=data}={}){let vErrors=null,errors=0;return null===data||(0,_IoK8sApimachineryPkgApisMetaV1MicroTime.validate)(data,{instancePath,parentData,parentDataProperty,rootData})||(errors=(vErrors=null===vErrors?_IoK8sApimachineryPkgApisMetaV1MicroTime.validate.errors:vErrors.concat(_IoK8sApimachineryPkgApisMetaV1MicroTime.validate.errors)).length),validate22.errors=vErrors,0===errors}function validate27(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 validate27.errors=vErrors,0===errors}let formats0=_validate.formats.int32;function validate21(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 validate21.errors=vErrors,0===errors}