"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.LustreMaintenanceTime=exports.Weekday=void 0;var jsiiDeprecationWarnings=()=>{var tmp=require("../../.warnings.jsii.js");return jsiiDeprecationWarnings=()=>tmp,tmp};const JSII_RTTI_SYMBOL_1=Symbol.for("jsii.rtti");var core_1=()=>{var tmp=require("../../core");return core_1=()=>tmp,tmp},literal_string_1=()=>{var tmp=require("../../core/lib/private/literal-string");return literal_string_1=()=>tmp,tmp},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{static[JSII_RTTI_SYMBOL_1]={fqn:"aws-cdk-lib.aws_fsx.LustreMaintenanceTime",version:"2.256.1"};day;hour;minute;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>23)throw new(core_1()).UnscopedValidationError((0,literal_string_1().lit)`MaintenanceTimeHourMustBeInteger`,"Maintenance time hour must be an integer between 0 and 23");if(!Number.isInteger(minute)||minute<0||minute>59)throw new(core_1()).UnscopedValidationError((0,literal_string_1().lit)`MaintenanceTimeMinuteMustBeInteger`,"Maintenance time minute must be an integer between 0 and 59")}}exports.LustreMaintenanceTime=LustreMaintenanceTime;
