UNPKG

aws-cdk-lib

Version:

Version 2 of the AWS Cloud Development Kit library

2 lines (1 loc) 13.5 kB
"use strict";var _a,_b,_c;Object.defineProperty(exports,"__esModule",{value:!0}),exports.CfnSlackWorkspaceConfiguration=exports.CfnSlackChannelConfiguration=exports.CfnAccountAlias=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 CfnAccountAliasPropsValidator(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("accountAlias",cdk.requiredValidator)(properties.accountAlias)),errors.collect(cdk.propertyValidator("accountAlias",cdk.validateString)(properties.accountAlias)),errors.wrap('supplied properties not correct for "CfnAccountAliasProps"')}function cfnAccountAliasPropsToCloudFormation(properties){return cdk.canInspect(properties)?(CfnAccountAliasPropsValidator(properties).assertSuccess(),{AccountAlias:cdk.stringToCloudFormation(properties.accountAlias)}):properties}function CfnAccountAliasPropsFromCloudFormation(properties){if(properties=properties??{},typeof properties!="object")return new cfn_parse.FromCloudFormationResult(properties);const ret=new cfn_parse.FromCloudFormationPropertyObject;return ret.addPropertyResult("accountAlias","AccountAlias",cfn_parse.FromCloudFormation.getString(properties.AccountAlias)),ret.addUnrecognizedPropertiesAsExtra(properties),ret}class CfnAccountAlias extends cdk.CfnResource{constructor(scope,id,props){super(scope,id,{type:CfnAccountAlias.CFN_RESOURCE_TYPE_NAME,properties:props});try{jsiiDeprecationWarnings.aws_cdk_lib_aws_supportapp_CfnAccountAliasProps(props)}catch(error){throw process.env.JSII_DEBUG!=="1"&&error.name==="DeprecationError"&&Error.captureStackTrace(error,CfnAccountAlias),error}cdk.requireProperty(props,"accountAlias",this),this.attrAccountAliasResourceId=cdk.Token.asString(this.getAtt("AccountAliasResourceId",cdk.ResolutionTypeHint.STRING)),this.accountAlias=props.accountAlias}static _fromCloudFormation(scope,id,resourceAttributes,options){resourceAttributes=resourceAttributes||{};const resourceProperties=options.parser.parseValue(resourceAttributes.Properties),propsResult=CfnAccountAliasPropsFromCloudFormation(resourceProperties),ret=new CfnAccountAlias(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",CfnAccountAlias.CFN_RESOURCE_TYPE_NAME),inspector.addAttribute("aws:cdk:cloudformation:props",this.cfnProperties)}get cfnProperties(){return{accountAlias:this.accountAlias}}renderProperties(props){return cfnAccountAliasPropsToCloudFormation(props)}}exports.CfnAccountAlias=CfnAccountAlias,_a=JSII_RTTI_SYMBOL_1,CfnAccountAlias[_a]={fqn:"aws-cdk-lib.aws_supportapp.CfnAccountAlias",version:"2.70.0"},CfnAccountAlias.CFN_RESOURCE_TYPE_NAME="AWS::SupportApp::AccountAlias";function CfnSlackChannelConfigurationPropsValidator(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("channelId",cdk.requiredValidator)(properties.channelId)),errors.collect(cdk.propertyValidator("channelId",cdk.validateString)(properties.channelId)),errors.collect(cdk.propertyValidator("channelName",cdk.validateString)(properties.channelName)),errors.collect(cdk.propertyValidator("channelRoleArn",cdk.requiredValidator)(properties.channelRoleArn)),errors.collect(cdk.propertyValidator("channelRoleArn",cdk.validateString)(properties.channelRoleArn)),errors.collect(cdk.propertyValidator("notifyOnAddCorrespondenceToCase",cdk.validateBoolean)(properties.notifyOnAddCorrespondenceToCase)),errors.collect(cdk.propertyValidator("notifyOnCaseSeverity",cdk.requiredValidator)(properties.notifyOnCaseSeverity)),errors.collect(cdk.propertyValidator("notifyOnCaseSeverity",cdk.validateString)(properties.notifyOnCaseSeverity)),errors.collect(cdk.propertyValidator("notifyOnCreateOrReopenCase",cdk.validateBoolean)(properties.notifyOnCreateOrReopenCase)),errors.collect(cdk.propertyValidator("notifyOnResolveCase",cdk.validateBoolean)(properties.notifyOnResolveCase)),errors.collect(cdk.propertyValidator("teamId",cdk.requiredValidator)(properties.teamId)),errors.collect(cdk.propertyValidator("teamId",cdk.validateString)(properties.teamId)),errors.wrap('supplied properties not correct for "CfnSlackChannelConfigurationProps"')}function cfnSlackChannelConfigurationPropsToCloudFormation(properties){return cdk.canInspect(properties)?(CfnSlackChannelConfigurationPropsValidator(properties).assertSuccess(),{ChannelId:cdk.stringToCloudFormation(properties.channelId),ChannelRoleArn:cdk.stringToCloudFormation(properties.channelRoleArn),NotifyOnCaseSeverity:cdk.stringToCloudFormation(properties.notifyOnCaseSeverity),TeamId:cdk.stringToCloudFormation(properties.teamId),ChannelName:cdk.stringToCloudFormation(properties.channelName),NotifyOnAddCorrespondenceToCase:cdk.booleanToCloudFormation(properties.notifyOnAddCorrespondenceToCase),NotifyOnCreateOrReopenCase:cdk.booleanToCloudFormation(properties.notifyOnCreateOrReopenCase),NotifyOnResolveCase:cdk.booleanToCloudFormation(properties.notifyOnResolveCase)}):properties}function CfnSlackChannelConfigurationPropsFromCloudFormation(properties){if(properties=properties??{},typeof properties!="object")return new cfn_parse.FromCloudFormationResult(properties);const ret=new cfn_parse.FromCloudFormationPropertyObject;return ret.addPropertyResult("channelId","ChannelId",cfn_parse.FromCloudFormation.getString(properties.ChannelId)),ret.addPropertyResult("channelRoleArn","ChannelRoleArn",cfn_parse.FromCloudFormation.getString(properties.ChannelRoleArn)),ret.addPropertyResult("notifyOnCaseSeverity","NotifyOnCaseSeverity",cfn_parse.FromCloudFormation.getString(properties.NotifyOnCaseSeverity)),ret.addPropertyResult("teamId","TeamId",cfn_parse.FromCloudFormation.getString(properties.TeamId)),ret.addPropertyResult("channelName","ChannelName",properties.ChannelName!=null?cfn_parse.FromCloudFormation.getString(properties.ChannelName):void 0),ret.addPropertyResult("notifyOnAddCorrespondenceToCase","NotifyOnAddCorrespondenceToCase",properties.NotifyOnAddCorrespondenceToCase!=null?cfn_parse.FromCloudFormation.getBoolean(properties.NotifyOnAddCorrespondenceToCase):void 0),ret.addPropertyResult("notifyOnCreateOrReopenCase","NotifyOnCreateOrReopenCase",properties.NotifyOnCreateOrReopenCase!=null?cfn_parse.FromCloudFormation.getBoolean(properties.NotifyOnCreateOrReopenCase):void 0),ret.addPropertyResult("notifyOnResolveCase","NotifyOnResolveCase",properties.NotifyOnResolveCase!=null?cfn_parse.FromCloudFormation.getBoolean(properties.NotifyOnResolveCase):void 0),ret.addUnrecognizedPropertiesAsExtra(properties),ret}class CfnSlackChannelConfiguration extends cdk.CfnResource{constructor(scope,id,props){super(scope,id,{type:CfnSlackChannelConfiguration.CFN_RESOURCE_TYPE_NAME,properties:props});try{jsiiDeprecationWarnings.aws_cdk_lib_aws_supportapp_CfnSlackChannelConfigurationProps(props)}catch(error){throw process.env.JSII_DEBUG!=="1"&&error.name==="DeprecationError"&&Error.captureStackTrace(error,CfnSlackChannelConfiguration),error}cdk.requireProperty(props,"channelId",this),cdk.requireProperty(props,"channelRoleArn",this),cdk.requireProperty(props,"notifyOnCaseSeverity",this),cdk.requireProperty(props,"teamId",this),this.channelId=props.channelId,this.channelRoleArn=props.channelRoleArn,this.notifyOnCaseSeverity=props.notifyOnCaseSeverity,this.teamId=props.teamId,this.channelName=props.channelName,this.notifyOnAddCorrespondenceToCase=props.notifyOnAddCorrespondenceToCase,this.notifyOnCreateOrReopenCase=props.notifyOnCreateOrReopenCase,this.notifyOnResolveCase=props.notifyOnResolveCase}static _fromCloudFormation(scope,id,resourceAttributes,options){resourceAttributes=resourceAttributes||{};const resourceProperties=options.parser.parseValue(resourceAttributes.Properties),propsResult=CfnSlackChannelConfigurationPropsFromCloudFormation(resourceProperties),ret=new CfnSlackChannelConfiguration(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",CfnSlackChannelConfiguration.CFN_RESOURCE_TYPE_NAME),inspector.addAttribute("aws:cdk:cloudformation:props",this.cfnProperties)}get cfnProperties(){return{channelId:this.channelId,channelRoleArn:this.channelRoleArn,notifyOnCaseSeverity:this.notifyOnCaseSeverity,teamId:this.teamId,channelName:this.channelName,notifyOnAddCorrespondenceToCase:this.notifyOnAddCorrespondenceToCase,notifyOnCreateOrReopenCase:this.notifyOnCreateOrReopenCase,notifyOnResolveCase:this.notifyOnResolveCase}}renderProperties(props){return cfnSlackChannelConfigurationPropsToCloudFormation(props)}}exports.CfnSlackChannelConfiguration=CfnSlackChannelConfiguration,_b=JSII_RTTI_SYMBOL_1,CfnSlackChannelConfiguration[_b]={fqn:"aws-cdk-lib.aws_supportapp.CfnSlackChannelConfiguration",version:"2.70.0"},CfnSlackChannelConfiguration.CFN_RESOURCE_TYPE_NAME="AWS::SupportApp::SlackChannelConfiguration";function CfnSlackWorkspaceConfigurationPropsValidator(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("teamId",cdk.requiredValidator)(properties.teamId)),errors.collect(cdk.propertyValidator("teamId",cdk.validateString)(properties.teamId)),errors.collect(cdk.propertyValidator("versionId",cdk.validateString)(properties.versionId)),errors.wrap('supplied properties not correct for "CfnSlackWorkspaceConfigurationProps"')}function cfnSlackWorkspaceConfigurationPropsToCloudFormation(properties){return cdk.canInspect(properties)?(CfnSlackWorkspaceConfigurationPropsValidator(properties).assertSuccess(),{TeamId:cdk.stringToCloudFormation(properties.teamId),VersionId:cdk.stringToCloudFormation(properties.versionId)}):properties}function CfnSlackWorkspaceConfigurationPropsFromCloudFormation(properties){if(properties=properties??{},typeof properties!="object")return new cfn_parse.FromCloudFormationResult(properties);const ret=new cfn_parse.FromCloudFormationPropertyObject;return ret.addPropertyResult("teamId","TeamId",cfn_parse.FromCloudFormation.getString(properties.TeamId)),ret.addPropertyResult("versionId","VersionId",properties.VersionId!=null?cfn_parse.FromCloudFormation.getString(properties.VersionId):void 0),ret.addUnrecognizedPropertiesAsExtra(properties),ret}class CfnSlackWorkspaceConfiguration extends cdk.CfnResource{constructor(scope,id,props){super(scope,id,{type:CfnSlackWorkspaceConfiguration.CFN_RESOURCE_TYPE_NAME,properties:props});try{jsiiDeprecationWarnings.aws_cdk_lib_aws_supportapp_CfnSlackWorkspaceConfigurationProps(props)}catch(error){throw process.env.JSII_DEBUG!=="1"&&error.name==="DeprecationError"&&Error.captureStackTrace(error,CfnSlackWorkspaceConfiguration),error}cdk.requireProperty(props,"teamId",this),this.teamId=props.teamId,this.versionId=props.versionId}static _fromCloudFormation(scope,id,resourceAttributes,options){resourceAttributes=resourceAttributes||{};const resourceProperties=options.parser.parseValue(resourceAttributes.Properties),propsResult=CfnSlackWorkspaceConfigurationPropsFromCloudFormation(resourceProperties),ret=new CfnSlackWorkspaceConfiguration(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",CfnSlackWorkspaceConfiguration.CFN_RESOURCE_TYPE_NAME),inspector.addAttribute("aws:cdk:cloudformation:props",this.cfnProperties)}get cfnProperties(){return{teamId:this.teamId,versionId:this.versionId}}renderProperties(props){return cfnSlackWorkspaceConfigurationPropsToCloudFormation(props)}}exports.CfnSlackWorkspaceConfiguration=CfnSlackWorkspaceConfiguration,_c=JSII_RTTI_SYMBOL_1,CfnSlackWorkspaceConfiguration[_c]={fqn:"aws-cdk-lib.aws_supportapp.CfnSlackWorkspaceConfiguration",version:"2.70.0"},CfnSlackWorkspaceConfiguration.CFN_RESOURCE_TYPE_NAME="AWS::SupportApp::SlackWorkspaceConfiguration";