UNPKG

aws-cdk-lib

Version:

Version 2 of the AWS Cloud Development Kit library

2 lines (1 loc) 16.8 kB
"use strict";var _a,_b,_c,_d;Object.defineProperty(exports,"__esModule",{value:!0}),exports.CfnResourceAssociation=exports.CfnAttributeGroupAssociation=exports.CfnAttributeGroup=exports.CfnApplication=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 CfnApplicationPropsValidator(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("description",cdk.validateString)(properties.description)),errors.collect(cdk.propertyValidator("name",cdk.requiredValidator)(properties.name)),errors.collect(cdk.propertyValidator("name",cdk.validateString)(properties.name)),errors.collect(cdk.propertyValidator("tags",cdk.hashValidator(cdk.validateString))(properties.tags)),errors.wrap('supplied properties not correct for "CfnApplicationProps"')}function cfnApplicationPropsToCloudFormation(properties){return cdk.canInspect(properties)?(CfnApplicationPropsValidator(properties).assertSuccess(),{Name:cdk.stringToCloudFormation(properties.name),Description:cdk.stringToCloudFormation(properties.description),Tags:cdk.hashMapper(cdk.stringToCloudFormation)(properties.tags)}):properties}function CfnApplicationPropsFromCloudFormation(properties){if(properties=properties??{},typeof properties!="object")return new cfn_parse.FromCloudFormationResult(properties);const ret=new cfn_parse.FromCloudFormationPropertyObject;return ret.addPropertyResult("name","Name",cfn_parse.FromCloudFormation.getString(properties.Name)),ret.addPropertyResult("description","Description",properties.Description!=null?cfn_parse.FromCloudFormation.getString(properties.Description):void 0),ret.addPropertyResult("tags","Tags",properties.Tags!=null?cfn_parse.FromCloudFormation.getMap(cfn_parse.FromCloudFormation.getString)(properties.Tags):void 0),ret.addUnrecognizedPropertiesAsExtra(properties),ret}class CfnApplication extends cdk.CfnResource{constructor(scope,id,props){super(scope,id,{type:CfnApplication.CFN_RESOURCE_TYPE_NAME,properties:props});try{jsiiDeprecationWarnings.aws_cdk_lib_aws_servicecatalogappregistry_CfnApplicationProps(props)}catch(error){throw process.env.JSII_DEBUG!=="1"&&error.name==="DeprecationError"&&Error.captureStackTrace(error,CfnApplication),error}cdk.requireProperty(props,"name",this),this.attrArn=cdk.Token.asString(this.getAtt("Arn",cdk.ResolutionTypeHint.STRING)),this.attrId=cdk.Token.asString(this.getAtt("Id",cdk.ResolutionTypeHint.STRING)),this.name=props.name,this.description=props.description,this.tags=new cdk.TagManager(cdk.TagType.MAP,"AWS::ServiceCatalogAppRegistry::Application",props.tags,{tagPropertyName:"tags"})}static _fromCloudFormation(scope,id,resourceAttributes,options){resourceAttributes=resourceAttributes||{};const resourceProperties=options.parser.parseValue(resourceAttributes.Properties),propsResult=CfnApplicationPropsFromCloudFormation(resourceProperties),ret=new CfnApplication(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",CfnApplication.CFN_RESOURCE_TYPE_NAME),inspector.addAttribute("aws:cdk:cloudformation:props",this.cfnProperties)}get cfnProperties(){return{name:this.name,description:this.description,tags:this.tags.renderTags()}}renderProperties(props){return cfnApplicationPropsToCloudFormation(props)}}exports.CfnApplication=CfnApplication,_a=JSII_RTTI_SYMBOL_1,CfnApplication[_a]={fqn:"aws-cdk-lib.aws_servicecatalogappregistry.CfnApplication",version:"2.70.0"},CfnApplication.CFN_RESOURCE_TYPE_NAME="AWS::ServiceCatalogAppRegistry::Application";function CfnAttributeGroupPropsValidator(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("attributes",cdk.requiredValidator)(properties.attributes)),errors.collect(cdk.propertyValidator("attributes",cdk.validateObject)(properties.attributes)),errors.collect(cdk.propertyValidator("description",cdk.validateString)(properties.description)),errors.collect(cdk.propertyValidator("name",cdk.requiredValidator)(properties.name)),errors.collect(cdk.propertyValidator("name",cdk.validateString)(properties.name)),errors.collect(cdk.propertyValidator("tags",cdk.hashValidator(cdk.validateString))(properties.tags)),errors.wrap('supplied properties not correct for "CfnAttributeGroupProps"')}function cfnAttributeGroupPropsToCloudFormation(properties){return cdk.canInspect(properties)?(CfnAttributeGroupPropsValidator(properties).assertSuccess(),{Attributes:cdk.objectToCloudFormation(properties.attributes),Name:cdk.stringToCloudFormation(properties.name),Description:cdk.stringToCloudFormation(properties.description),Tags:cdk.hashMapper(cdk.stringToCloudFormation)(properties.tags)}):properties}function CfnAttributeGroupPropsFromCloudFormation(properties){if(properties=properties??{},typeof properties!="object")return new cfn_parse.FromCloudFormationResult(properties);const ret=new cfn_parse.FromCloudFormationPropertyObject;return ret.addPropertyResult("attributes","Attributes",cfn_parse.FromCloudFormation.getAny(properties.Attributes)),ret.addPropertyResult("name","Name",cfn_parse.FromCloudFormation.getString(properties.Name)),ret.addPropertyResult("description","Description",properties.Description!=null?cfn_parse.FromCloudFormation.getString(properties.Description):void 0),ret.addPropertyResult("tags","Tags",properties.Tags!=null?cfn_parse.FromCloudFormation.getMap(cfn_parse.FromCloudFormation.getString)(properties.Tags):void 0),ret.addUnrecognizedPropertiesAsExtra(properties),ret}class CfnAttributeGroup extends cdk.CfnResource{constructor(scope,id,props){super(scope,id,{type:CfnAttributeGroup.CFN_RESOURCE_TYPE_NAME,properties:props});try{jsiiDeprecationWarnings.aws_cdk_lib_aws_servicecatalogappregistry_CfnAttributeGroupProps(props)}catch(error){throw process.env.JSII_DEBUG!=="1"&&error.name==="DeprecationError"&&Error.captureStackTrace(error,CfnAttributeGroup),error}cdk.requireProperty(props,"attributes",this),cdk.requireProperty(props,"name",this),this.attrArn=cdk.Token.asString(this.getAtt("Arn",cdk.ResolutionTypeHint.STRING)),this.attrId=cdk.Token.asString(this.getAtt("Id",cdk.ResolutionTypeHint.STRING)),this.attributes=props.attributes,this.name=props.name,this.description=props.description,this.tags=new cdk.TagManager(cdk.TagType.MAP,"AWS::ServiceCatalogAppRegistry::AttributeGroup",props.tags,{tagPropertyName:"tags"})}static _fromCloudFormation(scope,id,resourceAttributes,options){resourceAttributes=resourceAttributes||{};const resourceProperties=options.parser.parseValue(resourceAttributes.Properties),propsResult=CfnAttributeGroupPropsFromCloudFormation(resourceProperties),ret=new CfnAttributeGroup(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",CfnAttributeGroup.CFN_RESOURCE_TYPE_NAME),inspector.addAttribute("aws:cdk:cloudformation:props",this.cfnProperties)}get cfnProperties(){return{attributes:this.attributes,name:this.name,description:this.description,tags:this.tags.renderTags()}}renderProperties(props){return cfnAttributeGroupPropsToCloudFormation(props)}}exports.CfnAttributeGroup=CfnAttributeGroup,_b=JSII_RTTI_SYMBOL_1,CfnAttributeGroup[_b]={fqn:"aws-cdk-lib.aws_servicecatalogappregistry.CfnAttributeGroup",version:"2.70.0"},CfnAttributeGroup.CFN_RESOURCE_TYPE_NAME="AWS::ServiceCatalogAppRegistry::AttributeGroup";function CfnAttributeGroupAssociationPropsValidator(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("application",cdk.requiredValidator)(properties.application)),errors.collect(cdk.propertyValidator("application",cdk.validateString)(properties.application)),errors.collect(cdk.propertyValidator("attributeGroup",cdk.requiredValidator)(properties.attributeGroup)),errors.collect(cdk.propertyValidator("attributeGroup",cdk.validateString)(properties.attributeGroup)),errors.wrap('supplied properties not correct for "CfnAttributeGroupAssociationProps"')}function cfnAttributeGroupAssociationPropsToCloudFormation(properties){return cdk.canInspect(properties)?(CfnAttributeGroupAssociationPropsValidator(properties).assertSuccess(),{Application:cdk.stringToCloudFormation(properties.application),AttributeGroup:cdk.stringToCloudFormation(properties.attributeGroup)}):properties}function CfnAttributeGroupAssociationPropsFromCloudFormation(properties){if(properties=properties??{},typeof properties!="object")return new cfn_parse.FromCloudFormationResult(properties);const ret=new cfn_parse.FromCloudFormationPropertyObject;return ret.addPropertyResult("application","Application",cfn_parse.FromCloudFormation.getString(properties.Application)),ret.addPropertyResult("attributeGroup","AttributeGroup",cfn_parse.FromCloudFormation.getString(properties.AttributeGroup)),ret.addUnrecognizedPropertiesAsExtra(properties),ret}class CfnAttributeGroupAssociation extends cdk.CfnResource{constructor(scope,id,props){super(scope,id,{type:CfnAttributeGroupAssociation.CFN_RESOURCE_TYPE_NAME,properties:props});try{jsiiDeprecationWarnings.aws_cdk_lib_aws_servicecatalogappregistry_CfnAttributeGroupAssociationProps(props)}catch(error){throw process.env.JSII_DEBUG!=="1"&&error.name==="DeprecationError"&&Error.captureStackTrace(error,CfnAttributeGroupAssociation),error}cdk.requireProperty(props,"application",this),cdk.requireProperty(props,"attributeGroup",this),this.attrApplicationArn=cdk.Token.asString(this.getAtt("ApplicationArn",cdk.ResolutionTypeHint.STRING)),this.attrAttributeGroupArn=cdk.Token.asString(this.getAtt("AttributeGroupArn",cdk.ResolutionTypeHint.STRING)),this.attrId=cdk.Token.asString(this.getAtt("Id",cdk.ResolutionTypeHint.STRING)),this.application=props.application,this.attributeGroup=props.attributeGroup}static _fromCloudFormation(scope,id,resourceAttributes,options){resourceAttributes=resourceAttributes||{};const resourceProperties=options.parser.parseValue(resourceAttributes.Properties),propsResult=CfnAttributeGroupAssociationPropsFromCloudFormation(resourceProperties),ret=new CfnAttributeGroupAssociation(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",CfnAttributeGroupAssociation.CFN_RESOURCE_TYPE_NAME),inspector.addAttribute("aws:cdk:cloudformation:props",this.cfnProperties)}get cfnProperties(){return{application:this.application,attributeGroup:this.attributeGroup}}renderProperties(props){return cfnAttributeGroupAssociationPropsToCloudFormation(props)}}exports.CfnAttributeGroupAssociation=CfnAttributeGroupAssociation,_c=JSII_RTTI_SYMBOL_1,CfnAttributeGroupAssociation[_c]={fqn:"aws-cdk-lib.aws_servicecatalogappregistry.CfnAttributeGroupAssociation",version:"2.70.0"},CfnAttributeGroupAssociation.CFN_RESOURCE_TYPE_NAME="AWS::ServiceCatalogAppRegistry::AttributeGroupAssociation";function CfnResourceAssociationPropsValidator(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("application",cdk.requiredValidator)(properties.application)),errors.collect(cdk.propertyValidator("application",cdk.validateString)(properties.application)),errors.collect(cdk.propertyValidator("resource",cdk.requiredValidator)(properties.resource)),errors.collect(cdk.propertyValidator("resource",cdk.validateString)(properties.resource)),errors.collect(cdk.propertyValidator("resourceType",cdk.requiredValidator)(properties.resourceType)),errors.collect(cdk.propertyValidator("resourceType",cdk.validateString)(properties.resourceType)),errors.wrap('supplied properties not correct for "CfnResourceAssociationProps"')}function cfnResourceAssociationPropsToCloudFormation(properties){return cdk.canInspect(properties)?(CfnResourceAssociationPropsValidator(properties).assertSuccess(),{Application:cdk.stringToCloudFormation(properties.application),Resource:cdk.stringToCloudFormation(properties.resource),ResourceType:cdk.stringToCloudFormation(properties.resourceType)}):properties}function CfnResourceAssociationPropsFromCloudFormation(properties){if(properties=properties??{},typeof properties!="object")return new cfn_parse.FromCloudFormationResult(properties);const ret=new cfn_parse.FromCloudFormationPropertyObject;return ret.addPropertyResult("application","Application",cfn_parse.FromCloudFormation.getString(properties.Application)),ret.addPropertyResult("resource","Resource",cfn_parse.FromCloudFormation.getString(properties.Resource)),ret.addPropertyResult("resourceType","ResourceType",cfn_parse.FromCloudFormation.getString(properties.ResourceType)),ret.addUnrecognizedPropertiesAsExtra(properties),ret}class CfnResourceAssociation extends cdk.CfnResource{constructor(scope,id,props){super(scope,id,{type:CfnResourceAssociation.CFN_RESOURCE_TYPE_NAME,properties:props});try{jsiiDeprecationWarnings.aws_cdk_lib_aws_servicecatalogappregistry_CfnResourceAssociationProps(props)}catch(error){throw process.env.JSII_DEBUG!=="1"&&error.name==="DeprecationError"&&Error.captureStackTrace(error,CfnResourceAssociation),error}cdk.requireProperty(props,"application",this),cdk.requireProperty(props,"resource",this),cdk.requireProperty(props,"resourceType",this),this.attrApplicationArn=cdk.Token.asString(this.getAtt("ApplicationArn",cdk.ResolutionTypeHint.STRING)),this.attrId=cdk.Token.asString(this.getAtt("Id",cdk.ResolutionTypeHint.STRING)),this.attrResourceArn=cdk.Token.asString(this.getAtt("ResourceArn",cdk.ResolutionTypeHint.STRING)),this.application=props.application,this.resource=props.resource,this.resourceType=props.resourceType}static _fromCloudFormation(scope,id,resourceAttributes,options){resourceAttributes=resourceAttributes||{};const resourceProperties=options.parser.parseValue(resourceAttributes.Properties),propsResult=CfnResourceAssociationPropsFromCloudFormation(resourceProperties),ret=new CfnResourceAssociation(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",CfnResourceAssociation.CFN_RESOURCE_TYPE_NAME),inspector.addAttribute("aws:cdk:cloudformation:props",this.cfnProperties)}get cfnProperties(){return{application:this.application,resource:this.resource,resourceType:this.resourceType}}renderProperties(props){return cfnResourceAssociationPropsToCloudFormation(props)}}exports.CfnResourceAssociation=CfnResourceAssociation,_d=JSII_RTTI_SYMBOL_1,CfnResourceAssociation[_d]={fqn:"aws-cdk-lib.aws_servicecatalogappregistry.CfnResourceAssociation",version:"2.70.0"},CfnResourceAssociation.CFN_RESOURCE_TYPE_NAME="AWS::ServiceCatalogAppRegistry::ResourceAssociation";