"use strict";var _a;Object.defineProperty(exports,"__esModule",{value:!0}),exports.BaseScalableAttribute=void 0;const jsiiDeprecationWarnings=require("../../.warnings.jsii.js"),JSII_RTTI_SYMBOL_1=Symbol.for("jsii.rtti"),constructs_1=require("constructs"),scalable_target_1=require("./scalable-target");class BaseScalableAttribute extends constructs_1.Construct{constructor(scope,id,props){var _b;super(scope,id),this.props=props;try{jsiiDeprecationWarnings.aws_cdk_lib_aws_applicationautoscaling_BaseScalableAttributeProps(props)}catch(error){throw process.env.JSII_DEBUG!=="1"&&error.name==="DeprecationError"&&Error.captureStackTrace(error,this.constructor),error}this.target=new scalable_target_1.ScalableTarget(this,"Target",{serviceNamespace:this.props.serviceNamespace,scalableDimension:this.props.dimension,resourceId:this.props.resourceId,role:this.props.role,minCapacity:(_b=props.minCapacity)!==null&&_b!==void 0?_b:1,maxCapacity:props.maxCapacity})}doScaleOnSchedule(id,props){try{jsiiDeprecationWarnings.aws_cdk_lib_aws_applicationautoscaling_ScalingSchedule(props)}catch(error){throw process.env.JSII_DEBUG!=="1"&&error.name==="DeprecationError"&&Error.captureStackTrace(error,this.doScaleOnSchedule),error}this.target.scaleOnSchedule(id,props)}doScaleOnMetric(id,props){try{jsiiDeprecationWarnings.aws_cdk_lib_aws_applicationautoscaling_BasicStepScalingPolicyProps(props)}catch(error){throw process.env.JSII_DEBUG!=="1"&&error.name==="DeprecationError"&&Error.captureStackTrace(error,this.doScaleOnMetric),error}this.target.scaleOnMetric(id,props)}doScaleToTrackMetric(id,props){try{jsiiDeprecationWarnings.aws_cdk_lib_aws_applicationautoscaling_BasicTargetTrackingScalingPolicyProps(props)}catch(error){throw process.env.JSII_DEBUG!=="1"&&error.name==="DeprecationError"&&Error.captureStackTrace(error,this.doScaleToTrackMetric),error}this.target.scaleToTrackMetric(id,props)}}exports.BaseScalableAttribute=BaseScalableAttribute,_a=JSII_RTTI_SYMBOL_1,BaseScalableAttribute[_a]={fqn:"aws-cdk-lib.aws_applicationautoscaling.BaseScalableAttribute",version:"2.24.1"};
//# sourceMappingURL=base-scalable-attribute.js.map
