"use strict";var _a,_b;Object.defineProperty(exports,"__esModule",{value:!0}),exports.S3OriginAccessControl=exports.OriginAccessControlBase=exports.Signing=exports.SigningProtocol=exports.SigningBehavior=exports.OriginAccessControlOriginType=exports.AccessLevel=void 0;var jsiiDeprecationWarnings=()=>{var tmp=require("../../.warnings.jsii.js");return jsiiDeprecationWarnings=()=>tmp,tmp};const JSII_RTTI_SYMBOL_1=Symbol.for("jsii.rtti");var cloudfront_generated_1=()=>{var tmp=require("./cloudfront.generated");return cloudfront_generated_1=()=>tmp,tmp},core_1=()=>{var tmp=require("../../core");return core_1=()=>tmp,tmp},AccessLevel;(function(AccessLevel2){AccessLevel2.READ="READ",AccessLevel2.WRITE="WRITE",AccessLevel2.DELETE="DELETE"})(AccessLevel||(exports.AccessLevel=AccessLevel={}));var OriginAccessControlOriginType;(function(OriginAccessControlOriginType2){OriginAccessControlOriginType2.S3="s3",OriginAccessControlOriginType2.LAMBDA="lambda",OriginAccessControlOriginType2.MEDIASTORE="mediastore",OriginAccessControlOriginType2.MEDIAPACKAGEV2="mediapackagev2"})(OriginAccessControlOriginType||(exports.OriginAccessControlOriginType=OriginAccessControlOriginType={}));var SigningBehavior;(function(SigningBehavior2){SigningBehavior2.ALWAYS="always",SigningBehavior2.NEVER="never",SigningBehavior2.NO_OVERRIDE="no-override"})(SigningBehavior||(exports.SigningBehavior=SigningBehavior={}));var SigningProtocol;(function(SigningProtocol2){SigningProtocol2.SIGV4="sigv4"})(SigningProtocol||(exports.SigningProtocol=SigningProtocol={}));class Signing{constructor(protocol,behavior){try{jsiiDeprecationWarnings().aws_cdk_lib_aws_cloudfront_SigningProtocol(protocol),jsiiDeprecationWarnings().aws_cdk_lib_aws_cloudfront_SigningBehavior(behavior)}catch(error){throw process.env.JSII_DEBUG!=="1"&&error.name==="DeprecationError"&&Error.captureStackTrace(error,Signing),error}this.protocol=protocol,this.behavior=behavior}}exports.Signing=Signing,_a=JSII_RTTI_SYMBOL_1,Signing[_a]={fqn:"aws-cdk-lib.aws_cloudfront.Signing",version:"2.159.0"},Signing.SIGV4_ALWAYS=new Signing(SigningProtocol.SIGV4,SigningBehavior.ALWAYS),Signing.SIGV4_NO_OVERRIDE=new Signing(SigningProtocol.SIGV4,SigningBehavior.NO_OVERRIDE),Signing.NEVER=new Signing(SigningProtocol.SIGV4,SigningBehavior.NEVER);class OriginAccessControlBase extends core_1().Resource{}exports.OriginAccessControlBase=OriginAccessControlBase;class S3OriginAccessControl extends OriginAccessControlBase{static fromOriginAccessControlId(scope,id,originAccessControlId){class Import extends core_1().Resource{constructor(){super(...arguments),this.originAccessControlId=originAccessControlId,this.originAccessControlOriginType=OriginAccessControlOriginType.S3}}return new Import(scope,id)}constructor(scope,id,props={}){super(scope,id);try{jsiiDeprecationWarnings().aws_cdk_lib_aws_cloudfront_S3OriginAccessControlProps(props)}catch(error){throw process.env.JSII_DEBUG!=="1"&&error.name==="DeprecationError"&&Error.captureStackTrace(error,S3OriginAccessControl),error}const resource=new(cloudfront_generated_1()).CfnOriginAccessControl(this,"Resource",{originAccessControlConfig:{description:props.description,name:props.originAccessControlName??core_1().Names.uniqueResourceName(this,{maxLength:64}),signingBehavior:props.signing?.behavior??SigningBehavior.ALWAYS,signingProtocol:props.signing?.protocol??SigningProtocol.SIGV4,originAccessControlOriginType:OriginAccessControlOriginType.S3}});this.originAccessControlId=resource.attrId}}exports.S3OriginAccessControl=S3OriginAccessControl,_b=JSII_RTTI_SYMBOL_1,S3OriginAccessControl[_b]={fqn:"aws-cdk-lib.aws_cloudfront.S3OriginAccessControl",version:"2.159.0"};
