UNPKG

aws-cdk-lib

Version:

Version 2 of the AWS Cloud Development Kit library

2 lines (1 loc) 19 kB
"use strict";var _a;Object.defineProperty(exports,"__esModule",{value:!0}),exports.CfnInferenceScheduler=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");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 CfnInferenceScheduler extends cdk().CfnResource{static _fromCloudFormation(scope,id,resourceAttributes,options){resourceAttributes=resourceAttributes||{};const resourceProperties=options.parser.parseValue(resourceAttributes.Properties),propsResult=CfnInferenceSchedulerPropsFromCloudFormation(resourceProperties);if(cdk().isResolvableObject(propsResult.value))throw new(cdk_errors()).ValidationError("Unexpected IResolvable",scope);const 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}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.dataDelayOffsetInMinutes=props.dataDelayOffsetInMinutes,this.dataInputConfiguration=props.dataInputConfiguration,this.dataOutputConfiguration=props.dataOutputConfiguration,this.dataUploadFrequency=props.dataUploadFrequency,this.inferenceSchedulerName=props.inferenceSchedulerName,this.modelName=props.modelName,this.roleArn=props.roleArn,this.serverSideKmsKeyId=props.serverSideKmsKeyId,this.tags=new(cdk()).TagManager(cdk().TagType.STANDARD,"AWS::LookoutEquipment::InferenceScheduler",props.tags,{tagPropertyName:"tags"}),this.tagsRaw=props.tags}get cfnProperties(){return{dataDelayOffsetInMinutes:this.dataDelayOffsetInMinutes,dataInputConfiguration:this.dataInputConfiguration,dataOutputConfiguration:this.dataOutputConfiguration,dataUploadFrequency:this.dataUploadFrequency,inferenceSchedulerName:this.inferenceSchedulerName,modelName:this.modelName,roleArn:this.roleArn,serverSideKmsKeyId:this.serverSideKmsKeyId,tags:this.tags.renderTags()}}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)}renderProperties(props){return convertCfnInferenceSchedulerPropsToCloudFormation(props)}}exports.CfnInferenceScheduler=CfnInferenceScheduler,_a=JSII_RTTI_SYMBOL_1,CfnInferenceScheduler[_a]={fqn:"aws-cdk-lib.aws_lookoutequipment.CfnInferenceScheduler",version:"2.185.0"},CfnInferenceScheduler.CFN_RESOURCE_TYPE_NAME="AWS::LookoutEquipment::InferenceScheduler";function CfnInferenceSchedulerInputNameConfigurationPropertyValidator(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("componentTimestampDelimiter",cdk().validateString)(properties.componentTimestampDelimiter)),errors.collect(cdk().propertyValidator("timestampFormat",cdk().validateString)(properties.timestampFormat)),errors.wrap('supplied properties not correct for "InputNameConfigurationProperty"')}function convertCfnInferenceSchedulerInputNameConfigurationPropertyToCloudFormation(properties){return cdk().canInspect(properties)?(CfnInferenceSchedulerInputNameConfigurationPropertyValidator(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??{},!(properties&&typeof properties=="object"&&!Array.isArray(properties)))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 CfnInferenceSchedulerS3InputConfigurationPropertyValidator(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("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 convertCfnInferenceSchedulerS3InputConfigurationPropertyToCloudFormation(properties){return cdk().canInspect(properties)?(CfnInferenceSchedulerS3InputConfigurationPropertyValidator(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??{},!(properties&&typeof properties=="object"&&!Array.isArray(properties)))return new(cfn_parse()).FromCloudFormationResult(properties);const ret=new(cfn_parse()).FromCloudFormationPropertyObject;return ret.addPropertyResult("bucket","Bucket",properties.Bucket!=null?cfn_parse().FromCloudFormation.getString(properties.Bucket):void 0),ret.addPropertyResult("prefix","Prefix",properties.Prefix!=null?cfn_parse().FromCloudFormation.getString(properties.Prefix):void 0),ret.addUnrecognizedPropertiesAsExtra(properties),ret}function CfnInferenceSchedulerDataInputConfigurationPropertyValidator(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("inferenceInputNameConfiguration",CfnInferenceSchedulerInputNameConfigurationPropertyValidator)(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",CfnInferenceSchedulerS3InputConfigurationPropertyValidator)(properties.s3InputConfiguration)),errors.wrap('supplied properties not correct for "DataInputConfigurationProperty"')}function convertCfnInferenceSchedulerDataInputConfigurationPropertyToCloudFormation(properties){return cdk().canInspect(properties)?(CfnInferenceSchedulerDataInputConfigurationPropertyValidator(properties).assertSuccess(),{InferenceInputNameConfiguration:convertCfnInferenceSchedulerInputNameConfigurationPropertyToCloudFormation(properties.inferenceInputNameConfiguration),InputTimeZoneOffset:cdk().stringToCloudFormation(properties.inputTimeZoneOffset),S3InputConfiguration:convertCfnInferenceSchedulerS3InputConfigurationPropertyToCloudFormation(properties.s3InputConfiguration)}):properties}function CfnInferenceSchedulerDataInputConfigurationPropertyFromCloudFormation(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("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",properties.S3InputConfiguration!=null?CfnInferenceSchedulerS3InputConfigurationPropertyFromCloudFormation(properties.S3InputConfiguration):void 0),ret.addUnrecognizedPropertiesAsExtra(properties),ret}function CfnInferenceSchedulerS3OutputConfigurationPropertyValidator(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("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 convertCfnInferenceSchedulerS3OutputConfigurationPropertyToCloudFormation(properties){return cdk().canInspect(properties)?(CfnInferenceSchedulerS3OutputConfigurationPropertyValidator(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??{},!(properties&&typeof properties=="object"&&!Array.isArray(properties)))return new(cfn_parse()).FromCloudFormationResult(properties);const ret=new(cfn_parse()).FromCloudFormationPropertyObject;return ret.addPropertyResult("bucket","Bucket",properties.Bucket!=null?cfn_parse().FromCloudFormation.getString(properties.Bucket):void 0),ret.addPropertyResult("prefix","Prefix",properties.Prefix!=null?cfn_parse().FromCloudFormation.getString(properties.Prefix):void 0),ret.addUnrecognizedPropertiesAsExtra(properties),ret}function CfnInferenceSchedulerDataOutputConfigurationPropertyValidator(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("kmsKeyId",cdk().validateString)(properties.kmsKeyId)),errors.collect(cdk().propertyValidator("s3OutputConfiguration",cdk().requiredValidator)(properties.s3OutputConfiguration)),errors.collect(cdk().propertyValidator("s3OutputConfiguration",CfnInferenceSchedulerS3OutputConfigurationPropertyValidator)(properties.s3OutputConfiguration)),errors.wrap('supplied properties not correct for "DataOutputConfigurationProperty"')}function convertCfnInferenceSchedulerDataOutputConfigurationPropertyToCloudFormation(properties){return cdk().canInspect(properties)?(CfnInferenceSchedulerDataOutputConfigurationPropertyValidator(properties).assertSuccess(),{KmsKeyId:cdk().stringToCloudFormation(properties.kmsKeyId),S3OutputConfiguration:convertCfnInferenceSchedulerS3OutputConfigurationPropertyToCloudFormation(properties.s3OutputConfiguration)}):properties}function CfnInferenceSchedulerDataOutputConfigurationPropertyFromCloudFormation(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("kmsKeyId","KmsKeyId",properties.KmsKeyId!=null?cfn_parse().FromCloudFormation.getString(properties.KmsKeyId):void 0),ret.addPropertyResult("s3OutputConfiguration","S3OutputConfiguration",properties.S3OutputConfiguration!=null?CfnInferenceSchedulerS3OutputConfigurationPropertyFromCloudFormation(properties.S3OutputConfiguration):void 0),ret.addUnrecognizedPropertiesAsExtra(properties),ret}function CfnInferenceSchedulerPropsValidator(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("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 convertCfnInferenceSchedulerPropsToCloudFormation(properties){return cdk().canInspect(properties)?(CfnInferenceSchedulerPropsValidator(properties).assertSuccess(),{DataDelayOffsetInMinutes:cdk().numberToCloudFormation(properties.dataDelayOffsetInMinutes),DataInputConfiguration:cdk().objectToCloudFormation(properties.dataInputConfiguration),DataOutputConfiguration:cdk().objectToCloudFormation(properties.dataOutputConfiguration),DataUploadFrequency:cdk().stringToCloudFormation(properties.dataUploadFrequency),InferenceSchedulerName:cdk().stringToCloudFormation(properties.inferenceSchedulerName),ModelName:cdk().stringToCloudFormation(properties.modelName),RoleArn:cdk().stringToCloudFormation(properties.roleArn),ServerSideKmsKeyId:cdk().stringToCloudFormation(properties.serverSideKmsKeyId),Tags:cdk().listMapper(cdk().cfnTagToCloudFormation)(properties.tags)}):properties}function CfnInferenceSchedulerPropsFromCloudFormation(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("dataDelayOffsetInMinutes","DataDelayOffsetInMinutes",properties.DataDelayOffsetInMinutes!=null?cfn_parse().FromCloudFormation.getNumber(properties.DataDelayOffsetInMinutes):void 0),ret.addPropertyResult("dataInputConfiguration","DataInputConfiguration",properties.DataInputConfiguration!=null?cfn_parse().FromCloudFormation.getAny(properties.DataInputConfiguration):void 0),ret.addPropertyResult("dataOutputConfiguration","DataOutputConfiguration",properties.DataOutputConfiguration!=null?cfn_parse().FromCloudFormation.getAny(properties.DataOutputConfiguration):void 0),ret.addPropertyResult("dataUploadFrequency","DataUploadFrequency",properties.DataUploadFrequency!=null?cfn_parse().FromCloudFormation.getString(properties.DataUploadFrequency):void 0),ret.addPropertyResult("inferenceSchedulerName","InferenceSchedulerName",properties.InferenceSchedulerName!=null?cfn_parse().FromCloudFormation.getString(properties.InferenceSchedulerName):void 0),ret.addPropertyResult("modelName","ModelName",properties.ModelName!=null?cfn_parse().FromCloudFormation.getString(properties.ModelName):void 0),ret.addPropertyResult("roleArn","RoleArn",properties.RoleArn!=null?cfn_parse().FromCloudFormation.getString(properties.RoleArn):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}