"use strict";var _a;Object.defineProperty(exports,"__esModule",{value:!0}),exports.LinuxArmBuildImage=void 0;const jsiiDeprecationWarnings=require("../../.warnings.jsii.js"),JSII_RTTI_SYMBOL_1=Symbol.for("jsii.rtti"),run_script_linux_build_spec_1=require("./private/run-script-linux-build-spec"),project_1=require("./project");class LinuxArmBuildImage{constructor(props){this.type="ARM_CONTAINER",this.defaultComputeType=project_1.ComputeType.LARGE,this.imageId=props.imageId,this.imagePullPrincipalType=props.imagePullPrincipalType,this.secretsManagerCredentials=props.secretsManagerCredentials,this.repository=props.repository}static fromEcrRepository(repository,tagOrDigest="latest"){try{jsiiDeprecationWarnings.aws_cdk_lib_aws_ecr_IRepository(repository)}catch(error){throw process.env.JSII_DEBUG!=="1"&&error.name==="DeprecationError"&&Error.captureStackTrace(error,this.fromEcrRepository),error}return new LinuxArmBuildImage({imageId:repository.repositoryUriForTagOrDigest(tagOrDigest),imagePullPrincipalType:project_1.ImagePullPrincipalType.SERVICE_ROLE,repository})}static fromCodeBuildImageId(id){return new LinuxArmBuildImage({imageId:id,imagePullPrincipalType:project_1.ImagePullPrincipalType.CODEBUILD})}validate(buildEnvironment){try{jsiiDeprecationWarnings.aws_cdk_lib_aws_codebuild_BuildEnvironment(buildEnvironment)}catch(error){throw process.env.JSII_DEBUG!=="1"&&error.name==="DeprecationError"&&Error.captureStackTrace(error,this.validate),error}const ret=[];return buildEnvironment.computeType&&buildEnvironment.computeType!==project_1.ComputeType.SMALL&&buildEnvironment.computeType!==project_1.ComputeType.LARGE&&ret.push(`ARM images only support ComputeTypes '${project_1.ComputeType.SMALL}' and '${project_1.ComputeType.LARGE}' - '${buildEnvironment.computeType}' was given`),ret}runScriptBuildspec(entrypoint){return run_script_linux_build_spec_1.runScriptLinuxBuildSpec(entrypoint)}}exports.LinuxArmBuildImage=LinuxArmBuildImage,_a=JSII_RTTI_SYMBOL_1,LinuxArmBuildImage[_a]={fqn:"aws-cdk-lib.aws_codebuild.LinuxArmBuildImage",version:"2.46.0"},LinuxArmBuildImage.AMAZON_LINUX_2_STANDARD_1_0=LinuxArmBuildImage.fromCodeBuildImageId("aws/codebuild/amazonlinux2-aarch64-standard:1.0"),LinuxArmBuildImage.AMAZON_LINUX_2_STANDARD_2_0=LinuxArmBuildImage.fromCodeBuildImageId("aws/codebuild/amazonlinux2-aarch64-standard:2.0");
//# sourceMappingURL=linux-arm-build-image.js.map
