"use strict";var _a;Object.defineProperty(exports,"__esModule",{value:!0}),exports.FleetComputeType=exports.Fleet=void 0;var jsiiDeprecationWarnings=()=>{var tmp=require("../../.warnings.jsii.js");return jsiiDeprecationWarnings=()=>tmp,tmp};const JSII_RTTI_SYMBOL_1=Symbol.for("jsii.rtti");var codebuild_generated_1=()=>{var tmp=require("./codebuild.generated");return codebuild_generated_1=()=>tmp,tmp},core_1=()=>{var tmp=require("../../core");return core_1=()=>tmp,tmp};class Fleet extends core_1().Resource{static fromFleetArn(scope,id,fleetArn){class Import extends core_1().Resource{constructor(){super(...arguments),this.fleetName=core_1().Arn.split(fleetArn,core_1().ArnFormat.SLASH_RESOURCE_NAME).resourceName.split(":")[0],this.fleetArn=fleetArn}get computeType(){throw new Error("Cannot retrieve computeType property from an imported Fleet")}get environmentType(){throw new Error("Cannot retrieve environmentType property from an imported Fleet")}}return new Import(scope,id)}constructor(scope,id,props){try{jsiiDeprecationWarnings().aws_cdk_lib_aws_codebuild_FleetProps(props)}catch(error){throw process.env.JSII_DEBUG!=="1"&&error.name==="DeprecationError"&&Error.captureStackTrace(error,Fleet),error}if(props.fleetName&&!core_1().Token.isUnresolved(props.fleetName)){if(props.fleetName.length<2)throw new Error(`Fleet name can not be shorter than 2 characters but has ${props.fleetName.length} characters.`);if(props.fleetName.length>128)throw new Error(`Fleet name can not be longer than 128 characters but has ${props.fleetName.length} characters.`)}if((props.baseCapacity??1)<1)throw new Error("baseCapacity must be greater than or equal to 1");super(scope,id,{physicalName:props.fleetName});const resource=new(codebuild_generated_1()).CfnFleet(this,"Resource",{name:props.fleetName,baseCapacity:props.baseCapacity,computeType:props.computeType,environmentType:props.environmentType});this.fleetArn=this.getResourceArnAttribute(resource.attrArn,{service:"codebuild",resource:"fleet",resourceName:this.physicalName,arnFormat:core_1().ArnFormat.SLASH_RESOURCE_NAME}),this.fleetName=this.getResourceNameAttribute(resource.ref),this.computeType=props.computeType,this.environmentType=props.environmentType}}exports.Fleet=Fleet,_a=JSII_RTTI_SYMBOL_1,Fleet[_a]={fqn:"aws-cdk-lib.aws_codebuild.Fleet",version:"2.148.1"};var FleetComputeType;(function(FleetComputeType2){FleetComputeType2.SMALL="BUILD_GENERAL1_SMALL",FleetComputeType2.MEDIUM="BUILD_GENERAL1_MEDIUM",FleetComputeType2.LARGE="BUILD_GENERAL1_LARGE",FleetComputeType2.X_LARGE="BUILD_GENERAL1_XLARGE",FleetComputeType2.X2_LARGE="BUILD_GENERAL1_2XLARGE"})(FleetComputeType||(exports.FleetComputeType=FleetComputeType={}));
