"use strict";var _a;Object.defineProperty(exports,"__esModule",{value:!0}),exports.BackupResource=exports.TagOperation=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},TagOperation;(function(TagOperation2){TagOperation2.STRING_EQUALS="STRINGEQUALS",TagOperation2.DUMMY="dummy"})(TagOperation||(exports.TagOperation=TagOperation={}));class BackupResource{static fromConstruct(construct){return new BackupResource(void 0,void 0,construct)}static fromDynamoDbTable(table){try{jsiiDeprecationWarnings().aws_cdk_lib_aws_dynamodb_ITable(table)}catch(error){throw process.env.JSII_DEBUG!=="1"&&error.name==="DeprecationError"&&Error.captureStackTrace(error,this.fromDynamoDbTable),error}return BackupResource.fromArn(table.tableArn)}static fromEc2Instance(instance){try{jsiiDeprecationWarnings().aws_cdk_lib_aws_ec2_IInstance(instance)}catch(error){throw process.env.JSII_DEBUG!=="1"&&error.name==="DeprecationError"&&Error.captureStackTrace(error,this.fromEc2Instance),error}return BackupResource.fromArn(core_1().Stack.of(instance).formatArn({service:"ec2",resource:"instance",resourceName:instance.instanceId}))}static fromEfsFileSystem(fileSystem){try{jsiiDeprecationWarnings().aws_cdk_lib_aws_efs_IFileSystem(fileSystem)}catch(error){throw process.env.JSII_DEBUG!=="1"&&error.name==="DeprecationError"&&Error.captureStackTrace(error,this.fromEfsFileSystem),error}return BackupResource.fromArn(core_1().Stack.of(fileSystem).formatArn({service:"elasticfilesystem",resource:"file-system",resourceName:fileSystem.fileSystemId}))}static fromRdsDatabaseInstance(instance){try{jsiiDeprecationWarnings().aws_cdk_lib_aws_rds_IDatabaseInstance(instance)}catch(error){throw process.env.JSII_DEBUG!=="1"&&error.name==="DeprecationError"&&Error.captureStackTrace(error,this.fromRdsDatabaseInstance),error}return BackupResource.fromArn(instance.instanceArn)}static fromRdsDatabaseCluster(cluster){try{jsiiDeprecationWarnings().aws_cdk_lib_aws_rds_IDatabaseCluster(cluster)}catch(error){throw process.env.JSII_DEBUG!=="1"&&error.name==="DeprecationError"&&Error.captureStackTrace(error,this.fromRdsDatabaseCluster),error}const stack=core_1().Stack.of(cluster);return BackupResource.fromArn(`arn:${stack.partition}:rds:${stack.region}:${stack.account}:cluster:${cluster.clusterIdentifier}`)}static fromRdsServerlessCluster(cluster){try{jsiiDeprecationWarnings().aws_cdk_lib_aws_rds_IServerlessCluster(cluster)}catch(error){throw process.env.JSII_DEBUG!=="1"&&error.name==="DeprecationError"&&Error.captureStackTrace(error,this.fromRdsServerlessCluster),error}return BackupResource.fromArn(cluster.clusterArn)}static fromArn(arn){return new BackupResource(arn)}static fromTag(key,value,operation){try{jsiiDeprecationWarnings().aws_cdk_lib_aws_backup_TagOperation(operation)}catch(error){throw process.env.JSII_DEBUG!=="1"&&error.name==="DeprecationError"&&Error.captureStackTrace(error,this.fromTag),error}return new BackupResource(void 0,{key,value,operation})}constructor(resource,tagCondition,construct){try{jsiiDeprecationWarnings().aws_cdk_lib_aws_backup_TagCondition(tagCondition)}catch(error){throw process.env.JSII_DEBUG!=="1"&&error.name==="DeprecationError"&&Error.captureStackTrace(error,BackupResource),error}this.resource=resource,this.tagCondition=tagCondition,this.construct=construct}}exports.BackupResource=BackupResource,_a=JSII_RTTI_SYMBOL_1,BackupResource[_a]={fqn:"aws-cdk-lib.aws_backup.BackupResource",version:"2.159.0"};
