UNPKG

aws-cdk-lib

Version:

Version 2 of the AWS Cloud Development Kit library

2 lines (1 loc) 17.3 kB
"use strict";var _a;Object.defineProperty(exports,"__esModule",{value:!0}),exports.CfnInferenceScheduler=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 CfnInferenceSchedulerPropsValidator(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("dataDelayOffsetInMinutes",cdk.validateNumber)(properties.dataDelayOffsetInMinutes)),errors.collect(cdk.propertyValidator("dataInputConfiguration",cdk.requiredValidator)(properties.dataInputConfiguration)),errors.collect(cdk.propertyValidator("dataInputConfiguration",cdk.validateObject)(properties.dataInputConfiguration)),errors.collect(cdk.propertyValidator("dataOutputConfiguration",cdk.requiredValidator)(properties.dataOutputConfiguration)),errors.collect(cdk.propertyValidator("dataOutputConfiguration",cdk.validateObject)(properties.dataOutputConfiguration)),errors.collect(cdk.propertyValidator("dataUploadFrequency",cdk.requiredValidator)(properties.dataUploadFrequency)),errors.collect(cdk.propertyValidator("dataUploadFrequency",cdk.validateString)(properties.dataUploadFrequency)),errors.collect(cdk.propertyValidator("inferenceSchedulerName",cdk.validateString)(properties.inferenceSchedulerName)),errors.collect(cdk.propertyValidator("modelName",cdk.requiredValidator)(properties.modelName)),errors.collect(cdk.propertyValidator("modelName",cdk.validateString)(properties.modelName)),errors.collect(cdk.propertyValidator("roleArn",cdk.requiredValidator)(properties.roleArn)),errors.collect(cdk.propertyValidator("roleArn",cdk.validateString)(properties.roleArn)),errors.collect(cdk.propertyValidator("serverSideKmsKeyId",cdk.validateString)(properties.serverSideKmsKeyId)),errors.collect(cdk.propertyValidator("tags",cdk.listValidator(cdk.validateCfnTag))(properties.tags)),errors.wrap('supplied properties not correct for "CfnInferenceSchedulerProps"')}function cfnInferenceSchedulerPropsToCloudFormation(properties){return cdk.canInspect(properties)?(CfnInferenceSchedulerPropsValidator(properties).assertSuccess(),{DataInputConfiguration:cdk.objectToCloudFormation(properties.dataInputConfiguration),DataOutputConfiguration:cdk.objectToCloudFormation(properties.dataOutputConfiguration),DataUploadFrequency:cdk.stringToCloudFormation(properties.dataUploadFrequency),ModelName:cdk.stringToCloudFormation(properties.modelName),RoleArn:cdk.stringToCloudFormation(properties.roleArn),DataDelayOffsetInMinutes:cdk.numberToCloudFormation(properties.dataDelayOffsetInMinutes),InferenceSchedulerName:cdk.stringToCloudFormation(properties.inferenceSchedulerName),ServerSideKmsKeyId:cdk.stringToCloudFormation(properties.serverSideKmsKeyId),Tags:cdk.listMapper(cdk.cfnTagToCloudFormation)(properties.tags)}):properties}function CfnInferenceSchedulerPropsFromCloudFormation(properties){if(properties=properties??{},typeof properties!="object")return new cfn_parse.FromCloudFormationResult(properties);const ret=new cfn_parse.FromCloudFormationPropertyObject;return ret.addPropertyResult("dataInputConfiguration","DataInputConfiguration",cfn_parse.FromCloudFormation.getAny(properties.DataInputConfiguration)),ret.addPropertyResult("dataOutputConfiguration","DataOutputConfiguration",cfn_parse.FromCloudFormation.getAny(properties.DataOutputConfiguration)),ret.addPropertyResult("dataUploadFrequency","DataUploadFrequency",cfn_parse.FromCloudFormation.getString(properties.DataUploadFrequency)),ret.addPropertyResult("modelName","ModelName",cfn_parse.FromCloudFormation.getString(properties.ModelName)),ret.addPropertyResult("roleArn","RoleArn",cfn_parse.FromCloudFormation.getString(properties.RoleArn)),ret.addPropertyResult("dataDelayOffsetInMinutes","DataDelayOffsetInMinutes",properties.DataDelayOffsetInMinutes!=null?cfn_parse.FromCloudFormation.getNumber(properties.DataDelayOffsetInMinutes):void 0),ret.addPropertyResult("inferenceSchedulerName","InferenceSchedulerName",properties.InferenceSchedulerName!=null?cfn_parse.FromCloudFormation.getString(properties.InferenceSchedulerName):void 0),ret.addPropertyResult("serverSideKmsKeyId","ServerSideKmsKeyId",properties.ServerSideKmsKeyId!=null?cfn_parse.FromCloudFormation.getString(properties.ServerSideKmsKeyId):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 CfnInferenceScheduler extends cdk.CfnResource{constructor(scope,id,props){super(scope,id,{type:CfnInferenceScheduler.CFN_RESOURCE_TYPE_NAME,properties:props});try{jsiiDeprecationWarnings.aws_cdk_lib_aws_lookoutequipment_CfnInferenceSchedulerProps(props)}catch(error){throw process.env.JSII_DEBUG!=="1"&&error.name==="DeprecationError"&&Error.captureStackTrace(error,CfnInferenceScheduler),error}cdk.requireProperty(props,"dataInputConfiguration",this),cdk.requireProperty(props,"dataOutputConfiguration",this),cdk.requireProperty(props,"dataUploadFrequency",this),cdk.requireProperty(props,"modelName",this),cdk.requireProperty(props,"roleArn",this),this.attrInferenceSchedulerArn=cdk.Token.asString(this.getAtt("InferenceSchedulerArn",cdk.ResolutionTypeHint.STRING)),this.dataInputConfiguration=props.dataInputConfiguration,this.dataOutputConfiguration=props.dataOutputConfiguration,this.dataUploadFrequency=props.dataUploadFrequency,this.modelName=props.modelName,this.roleArn=props.roleArn,this.dataDelayOffsetInMinutes=props.dataDelayOffsetInMinutes,this.inferenceSchedulerName=props.inferenceSchedulerName,this.serverSideKmsKeyId=props.serverSideKmsKeyId,this.tags=new cdk.TagManager(cdk.TagType.STANDARD,"AWS::LookoutEquipment::InferenceScheduler",props.tags,{tagPropertyName:"tags"})}static _fromCloudFormation(scope,id,resourceAttributes,options){resourceAttributes=resourceAttributes||{};const resourceProperties=options.parser.parseValue(resourceAttributes.Properties),propsResult=CfnInferenceSchedulerPropsFromCloudFormation(resourceProperties),ret=new CfnInferenceScheduler(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",CfnInferenceScheduler.CFN_RESOURCE_TYPE_NAME),inspector.addAttribute("aws:cdk:cloudformation:props",this.cfnProperties)}get cfnProperties(){return{dataInputConfiguration:this.dataInputConfiguration,dataOutputConfiguration:this.dataOutputConfiguration,dataUploadFrequency:this.dataUploadFrequency,modelName:this.modelName,roleArn:this.roleArn,dataDelayOffsetInMinutes:this.dataDelayOffsetInMinutes,inferenceSchedulerName:this.inferenceSchedulerName,serverSideKmsKeyId:this.serverSideKmsKeyId,tags:this.tags.renderTags()}}renderProperties(props){return cfnInferenceSchedulerPropsToCloudFormation(props)}}exports.CfnInferenceScheduler=CfnInferenceScheduler,_a=JSII_RTTI_SYMBOL_1,CfnInferenceScheduler[_a]={fqn:"aws-cdk-lib.aws_lookoutequipment.CfnInferenceScheduler",version:"2.70.0"},CfnInferenceScheduler.CFN_RESOURCE_TYPE_NAME="AWS::LookoutEquipment::InferenceScheduler";function CfnInferenceScheduler_DataInputConfigurationPropertyValidator(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("inferenceInputNameConfiguration",CfnInferenceScheduler_InputNameConfigurationPropertyValidator)(properties.inferenceInputNameConfiguration)),errors.collect(cdk.propertyValidator("inputTimeZoneOffset",cdk.validateString)(properties.inputTimeZoneOffset)),errors.collect(cdk.propertyValidator("s3InputConfiguration",cdk.requiredValidator)(properties.s3InputConfiguration)),errors.collect(cdk.propertyValidator("s3InputConfiguration",CfnInferenceScheduler_S3InputConfigurationPropertyValidator)(properties.s3InputConfiguration)),errors.wrap('supplied properties not correct for "DataInputConfigurationProperty"')}function cfnInferenceSchedulerDataInputConfigurationPropertyToCloudFormation(properties){return cdk.canInspect(properties)?(CfnInferenceScheduler_DataInputConfigurationPropertyValidator(properties).assertSuccess(),{InferenceInputNameConfiguration:cfnInferenceSchedulerInputNameConfigurationPropertyToCloudFormation(properties.inferenceInputNameConfiguration),InputTimeZoneOffset:cdk.stringToCloudFormation(properties.inputTimeZoneOffset),S3InputConfiguration:cfnInferenceSchedulerS3InputConfigurationPropertyToCloudFormation(properties.s3InputConfiguration)}):properties}function CfnInferenceSchedulerDataInputConfigurationPropertyFromCloudFormation(properties){if(cdk.isResolvableObject(properties))return new cfn_parse.FromCloudFormationResult(properties);if(properties=properties??{},typeof properties!="object")return new cfn_parse.FromCloudFormationResult(properties);const ret=new cfn_parse.FromCloudFormationPropertyObject;return ret.addPropertyResult("inferenceInputNameConfiguration","InferenceInputNameConfiguration",properties.InferenceInputNameConfiguration!=null?CfnInferenceSchedulerInputNameConfigurationPropertyFromCloudFormation(properties.InferenceInputNameConfiguration):void 0),ret.addPropertyResult("inputTimeZoneOffset","InputTimeZoneOffset",properties.InputTimeZoneOffset!=null?cfn_parse.FromCloudFormation.getString(properties.InputTimeZoneOffset):void 0),ret.addPropertyResult("s3InputConfiguration","S3InputConfiguration",CfnInferenceSchedulerS3InputConfigurationPropertyFromCloudFormation(properties.S3InputConfiguration)),ret.addUnrecognizedPropertiesAsExtra(properties),ret}function CfnInferenceScheduler_DataOutputConfigurationPropertyValidator(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("kmsKeyId",cdk.validateString)(properties.kmsKeyId)),errors.collect(cdk.propertyValidator("s3OutputConfiguration",cdk.requiredValidator)(properties.s3OutputConfiguration)),errors.collect(cdk.propertyValidator("s3OutputConfiguration",CfnInferenceScheduler_S3OutputConfigurationPropertyValidator)(properties.s3OutputConfiguration)),errors.wrap('supplied properties not correct for "DataOutputConfigurationProperty"')}function cfnInferenceSchedulerDataOutputConfigurationPropertyToCloudFormation(properties){return cdk.canInspect(properties)?(CfnInferenceScheduler_DataOutputConfigurationPropertyValidator(properties).assertSuccess(),{KmsKeyId:cdk.stringToCloudFormation(properties.kmsKeyId),S3OutputConfiguration:cfnInferenceSchedulerS3OutputConfigurationPropertyToCloudFormation(properties.s3OutputConfiguration)}):properties}function CfnInferenceSchedulerDataOutputConfigurationPropertyFromCloudFormation(properties){if(cdk.isResolvableObject(properties))return new cfn_parse.FromCloudFormationResult(properties);if(properties=properties??{},typeof properties!="object")return new cfn_parse.FromCloudFormationResult(properties);const ret=new cfn_parse.FromCloudFormationPropertyObject;return ret.addPropertyResult("kmsKeyId","KmsKeyId",properties.KmsKeyId!=null?cfn_parse.FromCloudFormation.getString(properties.KmsKeyId):void 0),ret.addPropertyResult("s3OutputConfiguration","S3OutputConfiguration",CfnInferenceSchedulerS3OutputConfigurationPropertyFromCloudFormation(properties.S3OutputConfiguration)),ret.addUnrecognizedPropertiesAsExtra(properties),ret}function CfnInferenceScheduler_InputNameConfigurationPropertyValidator(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("componentTimestampDelimiter",cdk.validateString)(properties.componentTimestampDelimiter)),errors.collect(cdk.propertyValidator("timestampFormat",cdk.validateString)(properties.timestampFormat)),errors.wrap('supplied properties not correct for "InputNameConfigurationProperty"')}function cfnInferenceSchedulerInputNameConfigurationPropertyToCloudFormation(properties){return cdk.canInspect(properties)?(CfnInferenceScheduler_InputNameConfigurationPropertyValidator(properties).assertSuccess(),{ComponentTimestampDelimiter:cdk.stringToCloudFormation(properties.componentTimestampDelimiter),TimestampFormat:cdk.stringToCloudFormation(properties.timestampFormat)}):properties}function CfnInferenceSchedulerInputNameConfigurationPropertyFromCloudFormation(properties){if(cdk.isResolvableObject(properties))return new cfn_parse.FromCloudFormationResult(properties);if(properties=properties??{},typeof properties!="object")return new cfn_parse.FromCloudFormationResult(properties);const ret=new cfn_parse.FromCloudFormationPropertyObject;return ret.addPropertyResult("componentTimestampDelimiter","ComponentTimestampDelimiter",properties.ComponentTimestampDelimiter!=null?cfn_parse.FromCloudFormation.getString(properties.ComponentTimestampDelimiter):void 0),ret.addPropertyResult("timestampFormat","TimestampFormat",properties.TimestampFormat!=null?cfn_parse.FromCloudFormation.getString(properties.TimestampFormat):void 0),ret.addUnrecognizedPropertiesAsExtra(properties),ret}function CfnInferenceScheduler_S3InputConfigurationPropertyValidator(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("bucket",cdk.requiredValidator)(properties.bucket)),errors.collect(cdk.propertyValidator("bucket",cdk.validateString)(properties.bucket)),errors.collect(cdk.propertyValidator("prefix",cdk.validateString)(properties.prefix)),errors.wrap('supplied properties not correct for "S3InputConfigurationProperty"')}function cfnInferenceSchedulerS3InputConfigurationPropertyToCloudFormation(properties){return cdk.canInspect(properties)?(CfnInferenceScheduler_S3InputConfigurationPropertyValidator(properties).assertSuccess(),{Bucket:cdk.stringToCloudFormation(properties.bucket),Prefix:cdk.stringToCloudFormation(properties.prefix)}):properties}function CfnInferenceSchedulerS3InputConfigurationPropertyFromCloudFormation(properties){if(cdk.isResolvableObject(properties))return new cfn_parse.FromCloudFormationResult(properties);if(properties=properties??{},typeof properties!="object")return new cfn_parse.FromCloudFormationResult(properties);const ret=new cfn_parse.FromCloudFormationPropertyObject;return ret.addPropertyResult("bucket","Bucket",cfn_parse.FromCloudFormation.getString(properties.Bucket)),ret.addPropertyResult("prefix","Prefix",properties.Prefix!=null?cfn_parse.FromCloudFormation.getString(properties.Prefix):void 0),ret.addUnrecognizedPropertiesAsExtra(properties),ret}function CfnInferenceScheduler_S3OutputConfigurationPropertyValidator(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("bucket",cdk.requiredValidator)(properties.bucket)),errors.collect(cdk.propertyValidator("bucket",cdk.validateString)(properties.bucket)),errors.collect(cdk.propertyValidator("prefix",cdk.validateString)(properties.prefix)),errors.wrap('supplied properties not correct for "S3OutputConfigurationProperty"')}function cfnInferenceSchedulerS3OutputConfigurationPropertyToCloudFormation(properties){return cdk.canInspect(properties)?(CfnInferenceScheduler_S3OutputConfigurationPropertyValidator(properties).assertSuccess(),{Bucket:cdk.stringToCloudFormation(properties.bucket),Prefix:cdk.stringToCloudFormation(properties.prefix)}):properties}function CfnInferenceSchedulerS3OutputConfigurationPropertyFromCloudFormation(properties){if(cdk.isResolvableObject(properties))return new cfn_parse.FromCloudFormationResult(properties);if(properties=properties??{},typeof properties!="object")return new cfn_parse.FromCloudFormationResult(properties);const ret=new cfn_parse.FromCloudFormationPropertyObject;return ret.addPropertyResult("bucket","Bucket",cfn_parse.FromCloudFormation.getString(properties.Bucket)),ret.addPropertyResult("prefix","Prefix",properties.Prefix!=null?cfn_parse.FromCloudFormation.getString(properties.Prefix):void 0),ret.addUnrecognizedPropertiesAsExtra(properties),ret}