aws-cdk-lib
Version:
Version 2 of the AWS Cloud Development Kit library
2 lines (1 loc) • 7.96 kB
JavaScript
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.CfnWorkflowDefinition=void 0;var jsiiDeprecationWarnings=()=>{var tmp=require("../../.warnings.jsii.js");return jsiiDeprecationWarnings=()=>tmp,tmp};const JSII_RTTI_SYMBOL_1=Symbol.for("jsii.rtti");var cdk=()=>{var tmp=require("../../core/lib");return cdk=()=>tmp,tmp},cfn_parse=()=>{var tmp=require("../../core/lib/helpers-internal");return cfn_parse=()=>tmp,tmp},cdk_errors=()=>{var tmp=require("../../core/lib/errors");return cdk_errors=()=>tmp,tmp};class CfnWorkflowDefinition extends cdk().CfnResource{static[JSII_RTTI_SYMBOL_1]={fqn:"aws-cdk-lib.aws_novaact.CfnWorkflowDefinition",version:"2.251.0"};static CFN_RESOURCE_TYPE_NAME="AWS::NovaAct::WorkflowDefinition";static _fromCloudFormation(scope,id,resourceAttributes,options){resourceAttributes=resourceAttributes||{};const resourceProperties=options.parser.parseValue(resourceAttributes.Properties),propsResult=CfnWorkflowDefinitionPropsFromCloudFormation(resourceProperties);if(cdk().isResolvableObject(propsResult.value))throw new(cdk_errors()).ValidationError(cfn_parse().lit`UnexpectedIResolvable`,"Unexpected IResolvable",scope);const ret=new CfnWorkflowDefinition(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}static isCfnWorkflowDefinition(x){return cdk().CfnResource.isCfnResource(x)&&x.cfnResourceType===CfnWorkflowDefinition.CFN_RESOURCE_TYPE_NAME}static arnForWorkflowDefinition(resource){try{jsiiDeprecationWarnings().aws_cdk_lib_interfaces_aws_novaact_IWorkflowDefinitionRef(resource)}catch(error){throw process.env.JSII_DEBUG!=="1"&&error.name==="DeprecationError"&&Error.captureStackTrace(error,this.arnForWorkflowDefinition),error}return resource.workflowDefinitionRef.workflowDefinitionArn}_description;_exportConfig;_name;constructor(scope,id,props){super(scope,id,{type:CfnWorkflowDefinition.CFN_RESOURCE_TYPE_NAME,properties:props});try{jsiiDeprecationWarnings().aws_cdk_lib_aws_novaact_CfnWorkflowDefinitionProps(props)}catch(error){throw process.env.JSII_DEBUG!=="1"&&error.name==="DeprecationError"&&Error.captureStackTrace(error,CfnWorkflowDefinition),error}cdk().requireProperty(props,"name",this),this._description=props.description,this._exportConfig=props.exportConfig,this._name=props.name}get workflowDefinitionRef(){return{workflowDefinitionArn:this.ref}}get description(){return this._description}set description(value){cdk().traceProperty(this.node,"Description"),this._description=value}get exportConfig(){return this._exportConfig}set exportConfig(value){cdk().traceProperty(this.node,"ExportConfig"),this._exportConfig=value}get name(){return this._name}set name(value){cdk().traceProperty(this.node,"Name"),this._name=value}get attrArn(){return cdk().Token.asString(this.getAtt("Arn",cdk().ResolutionTypeHint.STRING))}get attrCreatedAt(){return cdk().Token.asString(this.getAtt("CreatedAt",cdk().ResolutionTypeHint.STRING))}get attrStatus(){return cdk().Token.asString(this.getAtt("Status",cdk().ResolutionTypeHint.STRING))}get cfnProperties(){return{description:this._description,exportConfig:this._exportConfig,name:this._name}}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",CfnWorkflowDefinition.CFN_RESOURCE_TYPE_NAME),inspector.addAttribute("aws:cdk:cloudformation:logicalId",this._synthesizeLogicalId()),inspector.addAttribute("aws:cdk:cloudformation:props",this.cfnProperties)}renderProperties(props){return convertCfnWorkflowDefinitionPropsToCloudFormation(props)}}exports.CfnWorkflowDefinition=CfnWorkflowDefinition;function CfnWorkflowDefinitionWorkflowExportConfigPropertyValidator(properties){if(!cdk().canInspect(properties))return cdk().VALIDATION_SUCCESS;const errors=new(cdk()).ValidationResults;return properties&&typeof properties=="object"&&!Array.isArray(properties)||errors.collect(new(cdk()).ValidationResult("Expected an object, but received: "+JSON.stringify(properties))),errors.collect(cdk().propertyValidator("s3BucketName",cdk().requiredValidator)(properties.s3BucketName)),errors.collect(cdk().propertyValidator("s3BucketName",cdk().validateString)(properties.s3BucketName)),errors.collect(cdk().propertyValidator("s3KeyPrefix",cdk().validateString)(properties.s3KeyPrefix)),errors.wrap('supplied properties not correct for "WorkflowExportConfigProperty"')}function convertCfnWorkflowDefinitionWorkflowExportConfigPropertyToCloudFormation(properties){return cdk().canInspect(properties)?(CfnWorkflowDefinitionWorkflowExportConfigPropertyValidator(properties).assertSuccess(),{S3BucketName:cdk().stringToCloudFormation(properties.s3BucketName),S3KeyPrefix:cdk().stringToCloudFormation(properties.s3KeyPrefix)}):properties}function CfnWorkflowDefinitionWorkflowExportConfigPropertyFromCloudFormation(properties){if(cdk().isResolvableObject(properties))return new(cfn_parse()).FromCloudFormationResult(properties);if(properties=properties??{},!(properties&&typeof properties=="object"&&!Array.isArray(properties)))return new(cfn_parse()).FromCloudFormationResult(properties);const ret=new(cfn_parse()).FromCloudFormationPropertyObject;return ret.addPropertyResult("s3BucketName","S3BucketName",properties.S3BucketName!=null?cfn_parse().FromCloudFormation.getString(properties.S3BucketName):void 0),ret.addPropertyResult("s3KeyPrefix","S3KeyPrefix",properties.S3KeyPrefix!=null?cfn_parse().FromCloudFormation.getString(properties.S3KeyPrefix):void 0),ret.addUnrecognizedPropertiesAsExtra(properties),ret}function CfnWorkflowDefinitionPropsValidator(properties){if(!cdk().canInspect(properties))return cdk().VALIDATION_SUCCESS;const errors=new(cdk()).ValidationResults;return properties&&typeof properties=="object"&&!Array.isArray(properties)||errors.collect(new(cdk()).ValidationResult("Expected an object, but received: "+JSON.stringify(properties))),errors.collect(cdk().propertyValidator("description",cdk().validateString)(properties.description)),errors.collect(cdk().propertyValidator("exportConfig",CfnWorkflowDefinitionWorkflowExportConfigPropertyValidator)(properties.exportConfig)),errors.collect(cdk().propertyValidator("name",cdk().requiredValidator)(properties.name)),errors.collect(cdk().propertyValidator("name",cdk().validateString)(properties.name)),errors.wrap('supplied properties not correct for "CfnWorkflowDefinitionProps"')}function convertCfnWorkflowDefinitionPropsToCloudFormation(properties){return cdk().canInspect(properties)?(CfnWorkflowDefinitionPropsValidator(properties).assertSuccess(),{Description:cdk().stringToCloudFormation(properties.description),ExportConfig:convertCfnWorkflowDefinitionWorkflowExportConfigPropertyToCloudFormation(properties.exportConfig),Name:cdk().stringToCloudFormation(properties.name)}):properties}function CfnWorkflowDefinitionPropsFromCloudFormation(properties){if(cdk().isResolvableObject(properties))return new(cfn_parse()).FromCloudFormationResult(properties);if(properties=properties??{},!(properties&&typeof properties=="object"&&!Array.isArray(properties)))return new(cfn_parse()).FromCloudFormationResult(properties);const ret=new(cfn_parse()).FromCloudFormationPropertyObject;return ret.addPropertyResult("description","Description",properties.Description!=null?cfn_parse().FromCloudFormation.getString(properties.Description):void 0),ret.addPropertyResult("exportConfig","ExportConfig",properties.ExportConfig!=null?CfnWorkflowDefinitionWorkflowExportConfigPropertyFromCloudFormation(properties.ExportConfig):void 0),ret.addPropertyResult("name","Name",properties.Name!=null?cfn_parse().FromCloudFormation.getString(properties.Name):void 0),ret.addUnrecognizedPropertiesAsExtra(properties),ret}