"use strict";var _a,_b;Object.defineProperty(exports,"__esModule",{value:!0}),exports.SigningProfile=exports.Platform=void 0;const jsiiDeprecationWarnings=require("../../.warnings.jsii.js"),JSII_RTTI_SYMBOL_1=Symbol.for("jsii.rtti"),signer_generated_1=require("./signer.generated"),core_1=require("../../core");class Platform{constructor(platformId){this.platformId=platformId}}exports.Platform=Platform,_a=JSII_RTTI_SYMBOL_1,Platform[_a]={fqn:"aws-cdk-lib.aws_signer.Platform",version:"2.96.1"},Platform.AWS_IOT_DEVICE_MANAGEMENT_SHA256_ECDSA=new Platform("AWSIoTDeviceManagement-SHA256-ECDSA"),Platform.AWS_LAMBDA_SHA384_ECDSA=new Platform("AWSLambda-SHA384-ECDSA"),Platform.AMAZON_FREE_RTOS_TI_CC3220SF=new Platform("AmazonFreeRTOS-TI-CC3220SF"),Platform.AMAZON_FREE_RTOS_DEFAULT=new Platform("AmazonFreeRTOS-Default");class SigningProfile extends core_1.Resource{static fromSigningProfileAttributes(scope,id,attrs){try{jsiiDeprecationWarnings.aws_cdk_lib_aws_signer_SigningProfileAttributes(attrs)}catch(error){throw process.env.JSII_DEBUG!=="1"&&error.name==="DeprecationError"&&Error.captureStackTrace(error,this.fromSigningProfileAttributes),error}class Import extends core_1.Resource{constructor(signingProfileArn2,signingProfileProfileVersionArn){super(scope,id),this.signingProfileName=attrs.signingProfileName,this.signingProfileVersion=attrs.signingProfileVersion,this.signingProfileArn=signingProfileArn2,this.signingProfileVersionArn=signingProfileProfileVersionArn}}const signingProfileArn=core_1.Stack.of(scope).formatArn({service:"signer",resource:"",resourceName:`/signing-profiles/${attrs.signingProfileName}`}),SigningProfileVersionArn=core_1.Stack.of(scope).formatArn({service:"signer",resource:"",resourceName:`/signing-profiles/${attrs.signingProfileName}/${attrs.signingProfileVersion}`});return new Import(signingProfileArn,SigningProfileVersionArn)}constructor(scope,id,props){super(scope,id,{physicalName:props.signingProfileName});try{jsiiDeprecationWarnings.aws_cdk_lib_aws_signer_SigningProfileProps(props)}catch(error){throw process.env.JSII_DEBUG!=="1"&&error.name==="DeprecationError"&&Error.captureStackTrace(error,SigningProfile),error}const resource=new signer_generated_1.CfnSigningProfile(this,"Resource",{platformId:props.platform.platformId,signatureValidityPeriod:props.signatureValidity?{type:"DAYS",value:props.signatureValidity?.toDays()}:{type:"MONTHS",value:135}});this.signingProfileArn=resource.attrArn,this.signingProfileName=resource.attrProfileName,this.signingProfileVersion=resource.attrProfileVersion,this.signingProfileVersionArn=resource.attrProfileVersionArn}}exports.SigningProfile=SigningProfile,_b=JSII_RTTI_SYMBOL_1,SigningProfile[_b]={fqn:"aws-cdk-lib.aws_signer.SigningProfile",version:"2.96.1"};
