aws-cdk-lib
Version:
Version 2 of the AWS Cloud Development Kit library
2 lines (1 loc) • 9.05 kB
JavaScript
;var _a,_b;Object.defineProperty(exports,"__esModule",{value:!0}),exports.CfnStream=exports.CfnSignalingChannel=void 0;const jsiiDeprecationWarnings=require("../../.warnings.jsii.js"),JSII_RTTI_SYMBOL_1=Symbol.for("jsii.rtti"),cdk=require("../../core"),cfn_parse=require("../../core/lib/helpers-internal");function CfnSignalingChannelPropsValidator(properties){if(!cdk.canInspect(properties))return cdk.VALIDATION_SUCCESS;const errors=new cdk.ValidationResults;return typeof properties!="object"&&errors.collect(new cdk.ValidationResult("Expected an object, but received: "+JSON.stringify(properties))),errors.collect(cdk.propertyValidator("messageTtlSeconds",cdk.validateNumber)(properties.messageTtlSeconds)),errors.collect(cdk.propertyValidator("name",cdk.validateString)(properties.name)),errors.collect(cdk.propertyValidator("tags",cdk.listValidator(cdk.validateCfnTag))(properties.tags)),errors.collect(cdk.propertyValidator("type",cdk.validateString)(properties.type)),errors.wrap('supplied properties not correct for "CfnSignalingChannelProps"')}function cfnSignalingChannelPropsToCloudFormation(properties){return cdk.canInspect(properties)?(CfnSignalingChannelPropsValidator(properties).assertSuccess(),{MessageTtlSeconds:cdk.numberToCloudFormation(properties.messageTtlSeconds),Name:cdk.stringToCloudFormation(properties.name),Tags:cdk.listMapper(cdk.cfnTagToCloudFormation)(properties.tags),Type:cdk.stringToCloudFormation(properties.type)}):properties}function CfnSignalingChannelPropsFromCloudFormation(properties){if(properties=properties??{},typeof properties!="object")return new cfn_parse.FromCloudFormationResult(properties);const ret=new cfn_parse.FromCloudFormationPropertyObject;return ret.addPropertyResult("messageTtlSeconds","MessageTtlSeconds",properties.MessageTtlSeconds!=null?cfn_parse.FromCloudFormation.getNumber(properties.MessageTtlSeconds):void 0),ret.addPropertyResult("name","Name",properties.Name!=null?cfn_parse.FromCloudFormation.getString(properties.Name):void 0),ret.addPropertyResult("tags","Tags",properties.Tags!=null?cfn_parse.FromCloudFormation.getArray(cfn_parse.FromCloudFormation.getCfnTag)(properties.Tags):void 0),ret.addPropertyResult("type","Type",properties.Type!=null?cfn_parse.FromCloudFormation.getString(properties.Type):void 0),ret.addUnrecognizedPropertiesAsExtra(properties),ret}class CfnSignalingChannel extends cdk.CfnResource{constructor(scope,id,props={}){super(scope,id,{type:CfnSignalingChannel.CFN_RESOURCE_TYPE_NAME,properties:props});try{jsiiDeprecationWarnings.aws_cdk_lib_aws_kinesisvideo_CfnSignalingChannelProps(props)}catch(error){throw process.env.JSII_DEBUG!=="1"&&error.name==="DeprecationError"&&Error.captureStackTrace(error,CfnSignalingChannel),error}this.attrArn=cdk.Token.asString(this.getAtt("Arn",cdk.ResolutionTypeHint.STRING)),this.messageTtlSeconds=props.messageTtlSeconds,this.name=props.name,this.tags=new cdk.TagManager(cdk.TagType.STANDARD,"AWS::KinesisVideo::SignalingChannel",props.tags,{tagPropertyName:"tags"}),this.type=props.type}static _fromCloudFormation(scope,id,resourceAttributes,options){resourceAttributes=resourceAttributes||{};const resourceProperties=options.parser.parseValue(resourceAttributes.Properties),propsResult=CfnSignalingChannelPropsFromCloudFormation(resourceProperties),ret=new CfnSignalingChannel(scope,id,propsResult.value);for(const[propKey,propVal]of Object.entries(propsResult.extraProperties))ret.addPropertyOverride(propKey,propVal);return options.parser.handleAttributes(ret,resourceAttributes,id),ret}inspect(inspector){try{jsiiDeprecationWarnings.aws_cdk_lib_TreeInspector(inspector)}catch(error){throw process.env.JSII_DEBUG!=="1"&&error.name==="DeprecationError"&&Error.captureStackTrace(error,this.inspect),error}inspector.addAttribute("aws:cdk:cloudformation:type",CfnSignalingChannel.CFN_RESOURCE_TYPE_NAME),inspector.addAttribute("aws:cdk:cloudformation:props",this.cfnProperties)}get cfnProperties(){return{messageTtlSeconds:this.messageTtlSeconds,name:this.name,tags:this.tags.renderTags(),type:this.type}}renderProperties(props){return cfnSignalingChannelPropsToCloudFormation(props)}}exports.CfnSignalingChannel=CfnSignalingChannel,_a=JSII_RTTI_SYMBOL_1,CfnSignalingChannel[_a]={fqn:"aws-cdk-lib.aws_kinesisvideo.CfnSignalingChannel",version:"2.70.0"},CfnSignalingChannel.CFN_RESOURCE_TYPE_NAME="AWS::KinesisVideo::SignalingChannel";function CfnStreamPropsValidator(properties){if(!cdk.canInspect(properties))return cdk.VALIDATION_SUCCESS;const errors=new cdk.ValidationResults;return typeof properties!="object"&&errors.collect(new cdk.ValidationResult("Expected an object, but received: "+JSON.stringify(properties))),errors.collect(cdk.propertyValidator("dataRetentionInHours",cdk.validateNumber)(properties.dataRetentionInHours)),errors.collect(cdk.propertyValidator("deviceName",cdk.validateString)(properties.deviceName)),errors.collect(cdk.propertyValidator("kmsKeyId",cdk.validateString)(properties.kmsKeyId)),errors.collect(cdk.propertyValidator("mediaType",cdk.validateString)(properties.mediaType)),errors.collect(cdk.propertyValidator("name",cdk.validateString)(properties.name)),errors.collect(cdk.propertyValidator("tags",cdk.listValidator(cdk.validateCfnTag))(properties.tags)),errors.wrap('supplied properties not correct for "CfnStreamProps"')}function cfnStreamPropsToCloudFormation(properties){return cdk.canInspect(properties)?(CfnStreamPropsValidator(properties).assertSuccess(),{DataRetentionInHours:cdk.numberToCloudFormation(properties.dataRetentionInHours),DeviceName:cdk.stringToCloudFormation(properties.deviceName),KmsKeyId:cdk.stringToCloudFormation(properties.kmsKeyId),MediaType:cdk.stringToCloudFormation(properties.mediaType),Name:cdk.stringToCloudFormation(properties.name),Tags:cdk.listMapper(cdk.cfnTagToCloudFormation)(properties.tags)}):properties}function CfnStreamPropsFromCloudFormation(properties){if(properties=properties??{},typeof properties!="object")return new cfn_parse.FromCloudFormationResult(properties);const ret=new cfn_parse.FromCloudFormationPropertyObject;return ret.addPropertyResult("dataRetentionInHours","DataRetentionInHours",properties.DataRetentionInHours!=null?cfn_parse.FromCloudFormation.getNumber(properties.DataRetentionInHours):void 0),ret.addPropertyResult("deviceName","DeviceName",properties.DeviceName!=null?cfn_parse.FromCloudFormation.getString(properties.DeviceName):void 0),ret.addPropertyResult("kmsKeyId","KmsKeyId",properties.KmsKeyId!=null?cfn_parse.FromCloudFormation.getString(properties.KmsKeyId):void 0),ret.addPropertyResult("mediaType","MediaType",properties.MediaType!=null?cfn_parse.FromCloudFormation.getString(properties.MediaType):void 0),ret.addPropertyResult("name","Name",properties.Name!=null?cfn_parse.FromCloudFormation.getString(properties.Name):void 0),ret.addPropertyResult("tags","Tags",properties.Tags!=null?cfn_parse.FromCloudFormation.getArray(cfn_parse.FromCloudFormation.getCfnTag)(properties.Tags):void 0),ret.addUnrecognizedPropertiesAsExtra(properties),ret}class CfnStream extends cdk.CfnResource{constructor(scope,id,props={}){super(scope,id,{type:CfnStream.CFN_RESOURCE_TYPE_NAME,properties:props});try{jsiiDeprecationWarnings.aws_cdk_lib_aws_kinesisvideo_CfnStreamProps(props)}catch(error){throw process.env.JSII_DEBUG!=="1"&&error.name==="DeprecationError"&&Error.captureStackTrace(error,CfnStream),error}this.attrArn=cdk.Token.asString(this.getAtt("Arn",cdk.ResolutionTypeHint.STRING)),this.dataRetentionInHours=props.dataRetentionInHours,this.deviceName=props.deviceName,this.kmsKeyId=props.kmsKeyId,this.mediaType=props.mediaType,this.name=props.name,this.tags=new cdk.TagManager(cdk.TagType.STANDARD,"AWS::KinesisVideo::Stream",props.tags,{tagPropertyName:"tags"})}static _fromCloudFormation(scope,id,resourceAttributes,options){resourceAttributes=resourceAttributes||{};const resourceProperties=options.parser.parseValue(resourceAttributes.Properties),propsResult=CfnStreamPropsFromCloudFormation(resourceProperties),ret=new CfnStream(scope,id,propsResult.value);for(const[propKey,propVal]of Object.entries(propsResult.extraProperties))ret.addPropertyOverride(propKey,propVal);return options.parser.handleAttributes(ret,resourceAttributes,id),ret}inspect(inspector){try{jsiiDeprecationWarnings.aws_cdk_lib_TreeInspector(inspector)}catch(error){throw process.env.JSII_DEBUG!=="1"&&error.name==="DeprecationError"&&Error.captureStackTrace(error,this.inspect),error}inspector.addAttribute("aws:cdk:cloudformation:type",CfnStream.CFN_RESOURCE_TYPE_NAME),inspector.addAttribute("aws:cdk:cloudformation:props",this.cfnProperties)}get cfnProperties(){return{dataRetentionInHours:this.dataRetentionInHours,deviceName:this.deviceName,kmsKeyId:this.kmsKeyId,mediaType:this.mediaType,name:this.name,tags:this.tags.renderTags()}}renderProperties(props){return cfnStreamPropsToCloudFormation(props)}}exports.CfnStream=CfnStream,_b=JSII_RTTI_SYMBOL_1,CfnStream[_b]={fqn:"aws-cdk-lib.aws_kinesisvideo.CfnStream",version:"2.70.0"},CfnStream.CFN_RESOURCE_TYPE_NAME="AWS::KinesisVideo::Stream";