"use strict";var _a;Object.defineProperty(exports,"__esModule",{value:!0}),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/cfn-parse");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("applicationDescription",cdk.validateString)(properties.applicationDescription)),errors.collect(cdk.propertyValidator("applicationName",cdk.requiredValidator)(properties.applicationName)),errors.collect(cdk.propertyValidator("applicationName",cdk.validateString)(properties.applicationName)),errors.collect(cdk.propertyValidator("roleArn",cdk.requiredValidator)(properties.roleArn)),errors.collect(cdk.propertyValidator("roleArn",cdk.validateString)(properties.roleArn)),errors.collect(cdk.propertyValidator("tags",cdk.listValidator(cdk.validateCfnTag))(properties.tags)),errors.wrap('supplied properties not correct for "CfnApplicationProps"')}function cfnApplicationPropsToCloudFormation(properties){return cdk.canInspect(properties)?(CfnApplicationPropsValidator(properties).assertSuccess(),{ApplicationName:cdk.stringToCloudFormation(properties.applicationName),RoleArn:cdk.stringToCloudFormation(properties.roleArn),ApplicationDescription:cdk.stringToCloudFormation(properties.applicationDescription),Tags:cdk.listMapper(cdk.cfnTagToCloudFormation)(properties.tags)}):properties}function CfnApplicationPropsFromCloudFormation(properties){if(properties=properties==null?{}:properties,typeof properties!="object")return new cfn_parse.FromCloudFormationResult(properties);const ret=new cfn_parse.FromCloudFormationPropertyObject;return ret.addPropertyResult("applicationName","ApplicationName",cfn_parse.FromCloudFormation.getString(properties.ApplicationName)),ret.addPropertyResult("roleArn","RoleArn",cfn_parse.FromCloudFormation.getString(properties.RoleArn)),ret.addPropertyResult("applicationDescription","ApplicationDescription",properties.ApplicationDescription!=null?cfn_parse.FromCloudFormation.getString(properties.ApplicationDescription):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 CfnApplication extends cdk.CfnResource{constructor(scope,id,props){super(scope,id,{type:CfnApplication.CFN_RESOURCE_TYPE_NAME,properties:props});jsiiDeprecationWarnings.aws_cdk_lib_aws_iotfleethub_CfnApplicationProps(props),cdk.requireProperty(props,"applicationName",this),cdk.requireProperty(props,"roleArn",this),this.attrApplicationArn=cdk.Token.asString(this.getAtt("ApplicationArn")),this.attrApplicationCreationDate=cdk.Token.asNumber(this.getAtt("ApplicationCreationDate")),this.attrApplicationId=cdk.Token.asString(this.getAtt("ApplicationId")),this.attrApplicationLastUpdateDate=cdk.Token.asNumber(this.getAtt("ApplicationLastUpdateDate")),this.attrApplicationState=cdk.Token.asString(this.getAtt("ApplicationState")),this.attrApplicationUrl=cdk.Token.asString(this.getAtt("ApplicationUrl")),this.attrErrorMessage=cdk.Token.asString(this.getAtt("ErrorMessage")),this.attrSsoClientId=cdk.Token.asString(this.getAtt("SsoClientId")),this.applicationName=props.applicationName,this.roleArn=props.roleArn,this.applicationDescription=props.applicationDescription,this.tags=new cdk.TagManager(cdk.TagType.STANDARD,"AWS::IoTFleetHub::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){jsiiDeprecationWarnings.aws_cdk_lib_TreeInspector(inspector),inspector.addAttribute("aws:cdk:cloudformation:type",CfnApplication.CFN_RESOURCE_TYPE_NAME),inspector.addAttribute("aws:cdk:cloudformation:props",this.cfnProperties)}get cfnProperties(){return{applicationName:this.applicationName,roleArn:this.roleArn,applicationDescription:this.applicationDescription,tags:this.tags.renderTags()}}renderProperties(props){return cfnApplicationPropsToCloudFormation(props)}}exports.CfnApplication=CfnApplication,_a=JSII_RTTI_SYMBOL_1,CfnApplication[_a]={fqn:"aws-cdk-lib.aws_iotfleethub.CfnApplication",version:"2.13.0"},CfnApplication.CFN_RESOURCE_TYPE_NAME="AWS::IoTFleetHub::Application";
//# sourceMappingURL=iotfleethub.generated.js.map
