"use strict";var _a;Object.defineProperty(exports,"__esModule",{value:!0}),exports.LustreMaintenanceTime=exports.Weekday=void 0;const jsiiDeprecationWarnings=require("../../.warnings.jsii.js"),JSII_RTTI_SYMBOL_1=Symbol.for("jsii.rtti");var Weekday;(function(Weekday2){Weekday2.MONDAY="1",Weekday2.TUESDAY="2",Weekday2.WEDNESDAY="3",Weekday2.THURSDAY="4",Weekday2.FRIDAY="5",Weekday2.SATURDAY="6",Weekday2.SUNDAY="7"})(Weekday||(exports.Weekday=Weekday={}));class LustreMaintenanceTime{constructor(props){try{jsiiDeprecationWarnings.aws_cdk_lib_aws_fsx_LustreMaintenanceTimeProps(props)}catch(error){throw process.env.JSII_DEBUG!=="1"&&error.name==="DeprecationError"&&Error.captureStackTrace(error,LustreMaintenanceTime),error}this.validate(props.hour,props.minute),this.day=props.day,this.hour=this.getTwoDigitString(props.hour),this.minute=this.getTwoDigitString(props.minute)}toTimestamp(){return`${this.day.valueOf()}:${this.hour}:${this.minute}`}getTwoDigitString(n){const numberString=n.toString();return numberString.length===1?`0${n}`:numberString}validate(hour,minute){if(!Number.isInteger(hour)||hour<0||hour>24)throw new Error("Maintenance time hour must be an integer between 0 and 24");if(!Number.isInteger(minute)||minute<0||minute>59)throw new Error("Maintenance time minute must be an integer between 0 and 59")}}exports.LustreMaintenanceTime=LustreMaintenanceTime,_a=JSII_RTTI_SYMBOL_1,LustreMaintenanceTime[_a]={fqn:"aws-cdk-lib.aws_fsx.LustreMaintenanceTime",version:"2.96.1"};
