"use strict";var _a,_b;Object.defineProperty(exports,"__esModule",{value:!0}),exports.DockerImageFunction=exports.DockerImageCode=void 0;const jsiiDeprecationWarnings=require("../../.warnings.jsii.js"),JSII_RTTI_SYMBOL_1=Symbol.for("jsii.rtti"),code_1=require("./code"),function_1=require("./function"),handler_1=require("./handler"),runtime_1=require("./runtime"),aws_ecr_assets_1=require("../../aws-ecr-assets");class DockerImageCode{static fromEcr(repository,props){try{jsiiDeprecationWarnings.aws_cdk_lib_aws_ecr_IRepository(repository),jsiiDeprecationWarnings.aws_cdk_lib_aws_lambda_EcrImageCodeProps(props)}catch(error){throw process.env.JSII_DEBUG!=="1"&&error.name==="DeprecationError"&&Error.captureStackTrace(error,this.fromEcr),error}return{_bind(){return new code_1.EcrImageCode(repository,props)}}}static fromImageAsset(directory,props={}){try{jsiiDeprecationWarnings.aws_cdk_lib_aws_lambda_AssetImageCodeProps(props)}catch(error){throw process.env.JSII_DEBUG!=="1"&&error.name==="DeprecationError"&&Error.captureStackTrace(error,this.fromImageAsset),error}return{_bind(architecture){return new code_1.AssetImageCode(directory,{...architecture?.dockerPlatform?{platform:aws_ecr_assets_1.Platform.custom(architecture.dockerPlatform)}:{},...props})}}}}exports.DockerImageCode=DockerImageCode,_a=JSII_RTTI_SYMBOL_1,DockerImageCode[_a]={fqn:"aws-cdk-lib.aws_lambda.DockerImageCode",version:"2.96.1"};class DockerImageFunction extends function_1.Function{constructor(scope,id,props){super(scope,id,{...props,handler:handler_1.Handler.FROM_IMAGE,runtime:runtime_1.Runtime.FROM_IMAGE,code:props.code._bind(props.architecture)});try{jsiiDeprecationWarnings.aws_cdk_lib_aws_lambda_DockerImageFunctionProps(props)}catch(error){throw process.env.JSII_DEBUG!=="1"&&error.name==="DeprecationError"&&Error.captureStackTrace(error,DockerImageFunction),error}}}exports.DockerImageFunction=DockerImageFunction,_b=JSII_RTTI_SYMBOL_1,DockerImageFunction[_b]={fqn:"aws-cdk-lib.aws_lambda.DockerImageFunction",version:"2.96.1"};
