"use strict";
// Copyright 2012-2018 Amazon.com, Inc. or its affiliates. All Rights Reserved.
// Generated from the AWS CloudFormation Resource Specification
// See: docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/cfn-resource-specification.html
// @cfn2ts:meta@ {"generated":"2018-08-15T13:38:33.407Z","fingerprint":"e3vNmP/NKW1gpXWW7OXcwLVVuT0nEfh49+EU6Pf0gIw="}
Object.defineProperty(exports, "__esModule", { value: true });
// tslint:disable:max-line-length | This is generated code - line lengths are difficult to control
const cdk = require("@aws-cdk/cdk");
var cloudformation;
(function (cloudformation) {
    /**
     * Determine whether the given properties match those of a ``CustomActionTypeResourceProps``
     *
     * @param properties the TypeScript properties of a ``CustomActionTypeResourceProps``
     *
     * @returns the result of the validation.
     */
    function CustomActionTypeResourcePropsValidator(properties) {
        if (!cdk.canInspect(properties)) {
            return cdk.VALIDATION_SUCCESS;
        }
        const errors = new cdk.ValidationResults();
        errors.collect(cdk.propertyValidator('category', cdk.requiredValidator)(properties.category));
        errors.collect(cdk.propertyValidator('category', cdk.validateString)(properties.category));
        errors.collect(cdk.propertyValidator('configurationProperties', cdk.listValidator(CustomActionTypeResource_ConfigurationPropertiesPropertyValidator))(properties.configurationProperties));
        errors.collect(cdk.propertyValidator('inputArtifactDetails', cdk.requiredValidator)(properties.inputArtifactDetails));
        errors.collect(cdk.propertyValidator('inputArtifactDetails', CustomActionTypeResource_ArtifactDetailsPropertyValidator)(properties.inputArtifactDetails));
        errors.collect(cdk.propertyValidator('outputArtifactDetails', cdk.requiredValidator)(properties.outputArtifactDetails));
        errors.collect(cdk.propertyValidator('outputArtifactDetails', CustomActionTypeResource_ArtifactDetailsPropertyValidator)(properties.outputArtifactDetails));
        errors.collect(cdk.propertyValidator('provider', cdk.requiredValidator)(properties.provider));
        errors.collect(cdk.propertyValidator('provider', cdk.validateString)(properties.provider));
        errors.collect(cdk.propertyValidator('settings', CustomActionTypeResource_SettingsPropertyValidator)(properties.settings));
        errors.collect(cdk.propertyValidator('version', cdk.validateString)(properties.version));
        return errors.wrap('supplied properties not correct for "CustomActionTypeResourceProps"');
    }
    /**
     * Renders the AWS CloudFormation properties of an ``AWS::CodePipeline::CustomActionType`` resource
     *
     * @param properties the TypeScript properties of a ``CustomActionTypeResourceProps``
     *
     * @returns the AWS CloudFormation properties of an ``AWS::CodePipeline::CustomActionType`` resource.
     */
    function customActionTypeResourcePropsToCloudFormation(properties) {
        if (!cdk.canInspect(properties)) {
            return properties;
        }
        CustomActionTypeResourcePropsValidator(properties).assertSuccess();
        return {
            Category: cdk.stringToCloudFormation(properties.category),
            InputArtifactDetails: customActionTypeResourceArtifactDetailsPropertyToCloudFormation(properties.inputArtifactDetails),
            OutputArtifactDetails: customActionTypeResourceArtifactDetailsPropertyToCloudFormation(properties.outputArtifactDetails),
            Provider: cdk.stringToCloudFormation(properties.provider),
            ConfigurationProperties: cdk.listMapper(customActionTypeResourceConfigurationPropertiesPropertyToCloudFormation)(properties.configurationProperties),
            Settings: customActionTypeResourceSettingsPropertyToCloudFormation(properties.settings),
            Version: cdk.stringToCloudFormation(properties.version),
        };
    }
    /**
     * @link http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-codepipeline-customactiontype.html
     */
    class CustomActionTypeResource extends cdk.Resource {
        /**
         * Creates a new ``AWS::CodePipeline::CustomActionType``.
         *
         * @param parent     the ``cdk.Construct`` this ``CustomActionTypeResource`` is a part of
         * @param name       the name of the resource in the ``cdk.Construct`` tree
         * @param properties the properties of this ``CustomActionTypeResource``
         */
        constructor(parent, name, properties) {
            super(parent, name, { type: CustomActionTypeResource.resourceTypeName, properties });
            cdk.requireProperty(properties, 'category', this);
            cdk.requireProperty(properties, 'inputArtifactDetails', this);
            cdk.requireProperty(properties, 'outputArtifactDetails', this);
            cdk.requireProperty(properties, 'provider', this);
        }
        renderProperties() {
            return customActionTypeResourcePropsToCloudFormation(cdk.resolve(this.properties));
        }
    }
    /**
     * The CloudFormation resource type name for this resource class.
     */
    CustomActionTypeResource.resourceTypeName = "AWS::CodePipeline::CustomActionType";
    cloudformation.CustomActionTypeResource = CustomActionTypeResource;
    /**
     * Determine whether the given properties match those of a ``ArtifactDetailsProperty``
     *
     * @param properties the TypeScript properties of a ``ArtifactDetailsProperty``
     *
     * @returns the result of the validation.
     */
    function CustomActionTypeResource_ArtifactDetailsPropertyValidator(properties) {
        if (!cdk.canInspect(properties)) {
            return cdk.VALIDATION_SUCCESS;
        }
        const errors = new cdk.ValidationResults();
        errors.collect(cdk.propertyValidator('maximumCount', cdk.requiredValidator)(properties.maximumCount));
        errors.collect(cdk.propertyValidator('maximumCount', cdk.validateNumber)(properties.maximumCount));
        errors.collect(cdk.propertyValidator('minimumCount', cdk.requiredValidator)(properties.minimumCount));
        errors.collect(cdk.propertyValidator('minimumCount', cdk.validateNumber)(properties.minimumCount));
        return errors.wrap('supplied properties not correct for "ArtifactDetailsProperty"');
    }
    /**
     * Renders the AWS CloudFormation properties of an ``AWS::CodePipeline::CustomActionType.ArtifactDetails`` resource
     *
     * @param properties the TypeScript properties of a ``ArtifactDetailsProperty``
     *
     * @returns the AWS CloudFormation properties of an ``AWS::CodePipeline::CustomActionType.ArtifactDetails`` resource.
     */
    function customActionTypeResourceArtifactDetailsPropertyToCloudFormation(properties) {
        if (!cdk.canInspect(properties)) {
            return properties;
        }
        CustomActionTypeResource_ArtifactDetailsPropertyValidator(properties).assertSuccess();
        return {
            MaximumCount: cdk.numberToCloudFormation(properties.maximumCount),
            MinimumCount: cdk.numberToCloudFormation(properties.minimumCount),
        };
    }
    /**
     * Determine whether the given properties match those of a ``ConfigurationPropertiesProperty``
     *
     * @param properties the TypeScript properties of a ``ConfigurationPropertiesProperty``
     *
     * @returns the result of the validation.
     */
    function CustomActionTypeResource_ConfigurationPropertiesPropertyValidator(properties) {
        if (!cdk.canInspect(properties)) {
            return cdk.VALIDATION_SUCCESS;
        }
        const errors = new cdk.ValidationResults();
        errors.collect(cdk.propertyValidator('description', cdk.validateString)(properties.description));
        errors.collect(cdk.propertyValidator('key', cdk.requiredValidator)(properties.key));
        errors.collect(cdk.propertyValidator('key', cdk.validateBoolean)(properties.key));
        errors.collect(cdk.propertyValidator('name', cdk.requiredValidator)(properties.name));
        errors.collect(cdk.propertyValidator('name', cdk.validateString)(properties.name));
        errors.collect(cdk.propertyValidator('queryable', cdk.validateBoolean)(properties.queryable));
        errors.collect(cdk.propertyValidator('required', cdk.requiredValidator)(properties.required));
        errors.collect(cdk.propertyValidator('required', cdk.validateBoolean)(properties.required));
        errors.collect(cdk.propertyValidator('secret', cdk.requiredValidator)(properties.secret));
        errors.collect(cdk.propertyValidator('secret', cdk.validateBoolean)(properties.secret));
        errors.collect(cdk.propertyValidator('type', cdk.validateString)(properties.type));
        return errors.wrap('supplied properties not correct for "ConfigurationPropertiesProperty"');
    }
    /**
     * Renders the AWS CloudFormation properties of an ``AWS::CodePipeline::CustomActionType.ConfigurationProperties`` resource
     *
     * @param properties the TypeScript properties of a ``ConfigurationPropertiesProperty``
     *
     * @returns the AWS CloudFormation properties of an ``AWS::CodePipeline::CustomActionType.ConfigurationProperties`` resource.
     */
    function customActionTypeResourceConfigurationPropertiesPropertyToCloudFormation(properties) {
        if (!cdk.canInspect(properties)) {
            return properties;
        }
        CustomActionTypeResource_ConfigurationPropertiesPropertyValidator(properties).assertSuccess();
        return {
            Description: cdk.stringToCloudFormation(properties.description),
            Key: cdk.booleanToCloudFormation(properties.key),
            Name: cdk.stringToCloudFormation(properties.name),
            Queryable: cdk.booleanToCloudFormation(properties.queryable),
            Required: cdk.booleanToCloudFormation(properties.required),
            Secret: cdk.booleanToCloudFormation(properties.secret),
            Type: cdk.stringToCloudFormation(properties.type),
        };
    }
    /**
     * Determine whether the given properties match those of a ``SettingsProperty``
     *
     * @param properties the TypeScript properties of a ``SettingsProperty``
     *
     * @returns the result of the validation.
     */
    function CustomActionTypeResource_SettingsPropertyValidator(properties) {
        if (!cdk.canInspect(properties)) {
            return cdk.VALIDATION_SUCCESS;
        }
        const errors = new cdk.ValidationResults();
        errors.collect(cdk.propertyValidator('entityUrlTemplate', cdk.validateString)(properties.entityUrlTemplate));
        errors.collect(cdk.propertyValidator('executionUrlTemplate', cdk.validateString)(properties.executionUrlTemplate));
        errors.collect(cdk.propertyValidator('revisionUrlTemplate', cdk.validateString)(properties.revisionUrlTemplate));
        errors.collect(cdk.propertyValidator('thirdPartyConfigurationUrl', cdk.validateString)(properties.thirdPartyConfigurationUrl));
        return errors.wrap('supplied properties not correct for "SettingsProperty"');
    }
    /**
     * Renders the AWS CloudFormation properties of an ``AWS::CodePipeline::CustomActionType.Settings`` resource
     *
     * @param properties the TypeScript properties of a ``SettingsProperty``
     *
     * @returns the AWS CloudFormation properties of an ``AWS::CodePipeline::CustomActionType.Settings`` resource.
     */
    function customActionTypeResourceSettingsPropertyToCloudFormation(properties) {
        if (!cdk.canInspect(properties)) {
            return properties;
        }
        CustomActionTypeResource_SettingsPropertyValidator(properties).assertSuccess();
        return {
            EntityUrlTemplate: cdk.stringToCloudFormation(properties.entityUrlTemplate),
            ExecutionUrlTemplate: cdk.stringToCloudFormation(properties.executionUrlTemplate),
            RevisionUrlTemplate: cdk.stringToCloudFormation(properties.revisionUrlTemplate),
            ThirdPartyConfigurationUrl: cdk.stringToCloudFormation(properties.thirdPartyConfigurationUrl),
        };
    }
})(cloudformation = exports.cloudformation || (exports.cloudformation = {}));
(function (cloudformation) {
    /**
     * Determine whether the given properties match those of a ``PipelineResourceProps``
     *
     * @param properties the TypeScript properties of a ``PipelineResourceProps``
     *
     * @returns the result of the validation.
     */
    function PipelineResourcePropsValidator(properties) {
        if (!cdk.canInspect(properties)) {
            return cdk.VALIDATION_SUCCESS;
        }
        const errors = new cdk.ValidationResults();
        errors.collect(cdk.propertyValidator('artifactStore', cdk.requiredValidator)(properties.artifactStore));
        errors.collect(cdk.propertyValidator('artifactStore', PipelineResource_ArtifactStorePropertyValidator)(properties.artifactStore));
        errors.collect(cdk.propertyValidator('disableInboundStageTransitions', cdk.listValidator(PipelineResource_StageTransitionPropertyValidator))(properties.disableInboundStageTransitions));
        errors.collect(cdk.propertyValidator('pipelineName', cdk.validateString)(properties.pipelineName));
        errors.collect(cdk.propertyValidator('restartExecutionOnUpdate', cdk.validateBoolean)(properties.restartExecutionOnUpdate));
        errors.collect(cdk.propertyValidator('roleArn', cdk.requiredValidator)(properties.roleArn));
        errors.collect(cdk.propertyValidator('roleArn', cdk.validateString)(properties.roleArn));
        errors.collect(cdk.propertyValidator('stages', cdk.requiredValidator)(properties.stages));
        errors.collect(cdk.propertyValidator('stages', cdk.listValidator(PipelineResource_StageDeclarationPropertyValidator))(properties.stages));
        return errors.wrap('supplied properties not correct for "PipelineResourceProps"');
    }
    /**
     * Renders the AWS CloudFormation properties of an ``AWS::CodePipeline::Pipeline`` resource
     *
     * @param properties the TypeScript properties of a ``PipelineResourceProps``
     *
     * @returns the AWS CloudFormation properties of an ``AWS::CodePipeline::Pipeline`` resource.
     */
    function pipelineResourcePropsToCloudFormation(properties) {
        if (!cdk.canInspect(properties)) {
            return properties;
        }
        PipelineResourcePropsValidator(properties).assertSuccess();
        return {
            ArtifactStore: pipelineResourceArtifactStorePropertyToCloudFormation(properties.artifactStore),
            RoleArn: cdk.stringToCloudFormation(properties.roleArn),
            Stages: cdk.listMapper(pipelineResourceStageDeclarationPropertyToCloudFormation)(properties.stages),
            DisableInboundStageTransitions: cdk.listMapper(pipelineResourceStageTransitionPropertyToCloudFormation)(properties.disableInboundStageTransitions),
            Name: cdk.stringToCloudFormation(properties.pipelineName),
            RestartExecutionOnUpdate: cdk.booleanToCloudFormation(properties.restartExecutionOnUpdate),
        };
    }
    /**
     * @link http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-codepipeline-pipeline.html
     */
    class PipelineResource extends cdk.Resource {
        /**
         * Creates a new ``AWS::CodePipeline::Pipeline``.
         *
         * @param parent     the ``cdk.Construct`` this ``PipelineResource`` is a part of
         * @param name       the name of the resource in the ``cdk.Construct`` tree
         * @param properties the properties of this ``PipelineResource``
         */
        constructor(parent, name, properties) {
            super(parent, name, { type: PipelineResource.resourceTypeName, properties });
            cdk.requireProperty(properties, 'artifactStore', this);
            cdk.requireProperty(properties, 'roleArn', this);
            cdk.requireProperty(properties, 'stages', this);
        }
        renderProperties() {
            return pipelineResourcePropsToCloudFormation(cdk.resolve(this.properties));
        }
    }
    /**
     * The CloudFormation resource type name for this resource class.
     */
    PipelineResource.resourceTypeName = "AWS::CodePipeline::Pipeline";
    cloudformation.PipelineResource = PipelineResource;
    /**
     * Determine whether the given properties match those of a ``ActionDeclarationProperty``
     *
     * @param properties the TypeScript properties of a ``ActionDeclarationProperty``
     *
     * @returns the result of the validation.
     */
    function PipelineResource_ActionDeclarationPropertyValidator(properties) {
        if (!cdk.canInspect(properties)) {
            return cdk.VALIDATION_SUCCESS;
        }
        const errors = new cdk.ValidationResults();
        errors.collect(cdk.propertyValidator('actionTypeId', cdk.requiredValidator)(properties.actionTypeId));
        errors.collect(cdk.propertyValidator('actionTypeId', PipelineResource_ActionTypeIdPropertyValidator)(properties.actionTypeId));
        errors.collect(cdk.propertyValidator('configuration', cdk.validateObject)(properties.configuration));
        errors.collect(cdk.propertyValidator('inputArtifacts', cdk.listValidator(PipelineResource_InputArtifactPropertyValidator))(properties.inputArtifacts));
        errors.collect(cdk.propertyValidator('name', cdk.requiredValidator)(properties.name));
        errors.collect(cdk.propertyValidator('name', cdk.validateString)(properties.name));
        errors.collect(cdk.propertyValidator('outputArtifacts', cdk.listValidator(PipelineResource_OutputArtifactPropertyValidator))(properties.outputArtifacts));
        errors.collect(cdk.propertyValidator('roleArn', cdk.validateString)(properties.roleArn));
        errors.collect(cdk.propertyValidator('runOrder', cdk.validateNumber)(properties.runOrder));
        return errors.wrap('supplied properties not correct for "ActionDeclarationProperty"');
    }
    /**
     * Renders the AWS CloudFormation properties of an ``AWS::CodePipeline::Pipeline.ActionDeclaration`` resource
     *
     * @param properties the TypeScript properties of a ``ActionDeclarationProperty``
     *
     * @returns the AWS CloudFormation properties of an ``AWS::CodePipeline::Pipeline.ActionDeclaration`` resource.
     */
    function pipelineResourceActionDeclarationPropertyToCloudFormation(properties) {
        if (!cdk.canInspect(properties)) {
            return properties;
        }
        PipelineResource_ActionDeclarationPropertyValidator(properties).assertSuccess();
        return {
            ActionTypeId: pipelineResourceActionTypeIdPropertyToCloudFormation(properties.actionTypeId),
            Configuration: cdk.objectToCloudFormation(properties.configuration),
            InputArtifacts: cdk.listMapper(pipelineResourceInputArtifactPropertyToCloudFormation)(properties.inputArtifacts),
            Name: cdk.stringToCloudFormation(properties.name),
            OutputArtifacts: cdk.listMapper(pipelineResourceOutputArtifactPropertyToCloudFormation)(properties.outputArtifacts),
            RoleArn: cdk.stringToCloudFormation(properties.roleArn),
            RunOrder: cdk.numberToCloudFormation(properties.runOrder),
        };
    }
    /**
     * Determine whether the given properties match those of a ``ActionTypeIdProperty``
     *
     * @param properties the TypeScript properties of a ``ActionTypeIdProperty``
     *
     * @returns the result of the validation.
     */
    function PipelineResource_ActionTypeIdPropertyValidator(properties) {
        if (!cdk.canInspect(properties)) {
            return cdk.VALIDATION_SUCCESS;
        }
        const errors = new cdk.ValidationResults();
        errors.collect(cdk.propertyValidator('category', cdk.requiredValidator)(properties.category));
        errors.collect(cdk.propertyValidator('category', cdk.validateString)(properties.category));
        errors.collect(cdk.propertyValidator('owner', cdk.requiredValidator)(properties.owner));
        errors.collect(cdk.propertyValidator('owner', cdk.validateString)(properties.owner));
        errors.collect(cdk.propertyValidator('provider', cdk.requiredValidator)(properties.provider));
        errors.collect(cdk.propertyValidator('provider', cdk.validateString)(properties.provider));
        errors.collect(cdk.propertyValidator('version', cdk.requiredValidator)(properties.version));
        errors.collect(cdk.propertyValidator('version', cdk.validateString)(properties.version));
        return errors.wrap('supplied properties not correct for "ActionTypeIdProperty"');
    }
    /**
     * Renders the AWS CloudFormation properties of an ``AWS::CodePipeline::Pipeline.ActionTypeId`` resource
     *
     * @param properties the TypeScript properties of a ``ActionTypeIdProperty``
     *
     * @returns the AWS CloudFormation properties of an ``AWS::CodePipeline::Pipeline.ActionTypeId`` resource.
     */
    function pipelineResourceActionTypeIdPropertyToCloudFormation(properties) {
        if (!cdk.canInspect(properties)) {
            return properties;
        }
        PipelineResource_ActionTypeIdPropertyValidator(properties).assertSuccess();
        return {
            Category: cdk.stringToCloudFormation(properties.category),
            Owner: cdk.stringToCloudFormation(properties.owner),
            Provider: cdk.stringToCloudFormation(properties.provider),
            Version: cdk.stringToCloudFormation(properties.version),
        };
    }
    /**
     * Determine whether the given properties match those of a ``ArtifactStoreProperty``
     *
     * @param properties the TypeScript properties of a ``ArtifactStoreProperty``
     *
     * @returns the result of the validation.
     */
    function PipelineResource_ArtifactStorePropertyValidator(properties) {
        if (!cdk.canInspect(properties)) {
            return cdk.VALIDATION_SUCCESS;
        }
        const errors = new cdk.ValidationResults();
        errors.collect(cdk.propertyValidator('encryptionKey', PipelineResource_EncryptionKeyPropertyValidator)(properties.encryptionKey));
        errors.collect(cdk.propertyValidator('location', cdk.requiredValidator)(properties.location));
        errors.collect(cdk.propertyValidator('location', cdk.validateString)(properties.location));
        errors.collect(cdk.propertyValidator('type', cdk.requiredValidator)(properties.type));
        errors.collect(cdk.propertyValidator('type', cdk.validateString)(properties.type));
        return errors.wrap('supplied properties not correct for "ArtifactStoreProperty"');
    }
    /**
     * Renders the AWS CloudFormation properties of an ``AWS::CodePipeline::Pipeline.ArtifactStore`` resource
     *
     * @param properties the TypeScript properties of a ``ArtifactStoreProperty``
     *
     * @returns the AWS CloudFormation properties of an ``AWS::CodePipeline::Pipeline.ArtifactStore`` resource.
     */
    function pipelineResourceArtifactStorePropertyToCloudFormation(properties) {
        if (!cdk.canInspect(properties)) {
            return properties;
        }
        PipelineResource_ArtifactStorePropertyValidator(properties).assertSuccess();
        return {
            EncryptionKey: pipelineResourceEncryptionKeyPropertyToCloudFormation(properties.encryptionKey),
            Location: cdk.stringToCloudFormation(properties.location),
            Type: cdk.stringToCloudFormation(properties.type),
        };
    }
    /**
     * Determine whether the given properties match those of a ``BlockerDeclarationProperty``
     *
     * @param properties the TypeScript properties of a ``BlockerDeclarationProperty``
     *
     * @returns the result of the validation.
     */
    function PipelineResource_BlockerDeclarationPropertyValidator(properties) {
        if (!cdk.canInspect(properties)) {
            return cdk.VALIDATION_SUCCESS;
        }
        const errors = new cdk.ValidationResults();
        errors.collect(cdk.propertyValidator('name', cdk.requiredValidator)(properties.name));
        errors.collect(cdk.propertyValidator('name', cdk.validateString)(properties.name));
        errors.collect(cdk.propertyValidator('type', cdk.requiredValidator)(properties.type));
        errors.collect(cdk.propertyValidator('type', cdk.validateString)(properties.type));
        return errors.wrap('supplied properties not correct for "BlockerDeclarationProperty"');
    }
    /**
     * Renders the AWS CloudFormation properties of an ``AWS::CodePipeline::Pipeline.BlockerDeclaration`` resource
     *
     * @param properties the TypeScript properties of a ``BlockerDeclarationProperty``
     *
     * @returns the AWS CloudFormation properties of an ``AWS::CodePipeline::Pipeline.BlockerDeclaration`` resource.
     */
    function pipelineResourceBlockerDeclarationPropertyToCloudFormation(properties) {
        if (!cdk.canInspect(properties)) {
            return properties;
        }
        PipelineResource_BlockerDeclarationPropertyValidator(properties).assertSuccess();
        return {
            Name: cdk.stringToCloudFormation(properties.name),
            Type: cdk.stringToCloudFormation(properties.type),
        };
    }
    /**
     * Determine whether the given properties match those of a ``EncryptionKeyProperty``
     *
     * @param properties the TypeScript properties of a ``EncryptionKeyProperty``
     *
     * @returns the result of the validation.
     */
    function PipelineResource_EncryptionKeyPropertyValidator(properties) {
        if (!cdk.canInspect(properties)) {
            return cdk.VALIDATION_SUCCESS;
        }
        const errors = new cdk.ValidationResults();
        errors.collect(cdk.propertyValidator('id', cdk.requiredValidator)(properties.id));
        errors.collect(cdk.propertyValidator('id', cdk.validateString)(properties.id));
        errors.collect(cdk.propertyValidator('type', cdk.requiredValidator)(properties.type));
        errors.collect(cdk.propertyValidator('type', cdk.validateString)(properties.type));
        return errors.wrap('supplied properties not correct for "EncryptionKeyProperty"');
    }
    /**
     * Renders the AWS CloudFormation properties of an ``AWS::CodePipeline::Pipeline.EncryptionKey`` resource
     *
     * @param properties the TypeScript properties of a ``EncryptionKeyProperty``
     *
     * @returns the AWS CloudFormation properties of an ``AWS::CodePipeline::Pipeline.EncryptionKey`` resource.
     */
    function pipelineResourceEncryptionKeyPropertyToCloudFormation(properties) {
        if (!cdk.canInspect(properties)) {
            return properties;
        }
        PipelineResource_EncryptionKeyPropertyValidator(properties).assertSuccess();
        return {
            Id: cdk.stringToCloudFormation(properties.id),
            Type: cdk.stringToCloudFormation(properties.type),
        };
    }
    /**
     * Determine whether the given properties match those of a ``InputArtifactProperty``
     *
     * @param properties the TypeScript properties of a ``InputArtifactProperty``
     *
     * @returns the result of the validation.
     */
    function PipelineResource_InputArtifactPropertyValidator(properties) {
        if (!cdk.canInspect(properties)) {
            return cdk.VALIDATION_SUCCESS;
        }
        const errors = new cdk.ValidationResults();
        errors.collect(cdk.propertyValidator('name', cdk.requiredValidator)(properties.name));
        errors.collect(cdk.propertyValidator('name', cdk.validateString)(properties.name));
        return errors.wrap('supplied properties not correct for "InputArtifactProperty"');
    }
    /**
     * Renders the AWS CloudFormation properties of an ``AWS::CodePipeline::Pipeline.InputArtifact`` resource
     *
     * @param properties the TypeScript properties of a ``InputArtifactProperty``
     *
     * @returns the AWS CloudFormation properties of an ``AWS::CodePipeline::Pipeline.InputArtifact`` resource.
     */
    function pipelineResourceInputArtifactPropertyToCloudFormation(properties) {
        if (!cdk.canInspect(properties)) {
            return properties;
        }
        PipelineResource_InputArtifactPropertyValidator(properties).assertSuccess();
        return {
            Name: cdk.stringToCloudFormation(properties.name),
        };
    }
    /**
     * Determine whether the given properties match those of a ``OutputArtifactProperty``
     *
     * @param properties the TypeScript properties of a ``OutputArtifactProperty``
     *
     * @returns the result of the validation.
     */
    function PipelineResource_OutputArtifactPropertyValidator(properties) {
        if (!cdk.canInspect(properties)) {
            return cdk.VALIDATION_SUCCESS;
        }
        const errors = new cdk.ValidationResults();
        errors.collect(cdk.propertyValidator('name', cdk.requiredValidator)(properties.name));
        errors.collect(cdk.propertyValidator('name', cdk.validateString)(properties.name));
        return errors.wrap('supplied properties not correct for "OutputArtifactProperty"');
    }
    /**
     * Renders the AWS CloudFormation properties of an ``AWS::CodePipeline::Pipeline.OutputArtifact`` resource
     *
     * @param properties the TypeScript properties of a ``OutputArtifactProperty``
     *
     * @returns the AWS CloudFormation properties of an ``AWS::CodePipeline::Pipeline.OutputArtifact`` resource.
     */
    function pipelineResourceOutputArtifactPropertyToCloudFormation(properties) {
        if (!cdk.canInspect(properties)) {
            return properties;
        }
        PipelineResource_OutputArtifactPropertyValidator(properties).assertSuccess();
        return {
            Name: cdk.stringToCloudFormation(properties.name),
        };
    }
    /**
     * Determine whether the given properties match those of a ``StageDeclarationProperty``
     *
     * @param properties the TypeScript properties of a ``StageDeclarationProperty``
     *
     * @returns the result of the validation.
     */
    function PipelineResource_StageDeclarationPropertyValidator(properties) {
        if (!cdk.canInspect(properties)) {
            return cdk.VALIDATION_SUCCESS;
        }
        const errors = new cdk.ValidationResults();
        errors.collect(cdk.propertyValidator('actions', cdk.requiredValidator)(properties.actions));
        errors.collect(cdk.propertyValidator('actions', cdk.listValidator(PipelineResource_ActionDeclarationPropertyValidator))(properties.actions));
        errors.collect(cdk.propertyValidator('blockers', cdk.listValidator(PipelineResource_BlockerDeclarationPropertyValidator))(properties.blockers));
        errors.collect(cdk.propertyValidator('name', cdk.requiredValidator)(properties.name));
        errors.collect(cdk.propertyValidator('name', cdk.validateString)(properties.name));
        return errors.wrap('supplied properties not correct for "StageDeclarationProperty"');
    }
    /**
     * Renders the AWS CloudFormation properties of an ``AWS::CodePipeline::Pipeline.StageDeclaration`` resource
     *
     * @param properties the TypeScript properties of a ``StageDeclarationProperty``
     *
     * @returns the AWS CloudFormation properties of an ``AWS::CodePipeline::Pipeline.StageDeclaration`` resource.
     */
    function pipelineResourceStageDeclarationPropertyToCloudFormation(properties) {
        if (!cdk.canInspect(properties)) {
            return properties;
        }
        PipelineResource_StageDeclarationPropertyValidator(properties).assertSuccess();
        return {
            Actions: cdk.listMapper(pipelineResourceActionDeclarationPropertyToCloudFormation)(properties.actions),
            Blockers: cdk.listMapper(pipelineResourceBlockerDeclarationPropertyToCloudFormation)(properties.blockers),
            Name: cdk.stringToCloudFormation(properties.name),
        };
    }
    /**
     * Determine whether the given properties match those of a ``StageTransitionProperty``
     *
     * @param properties the TypeScript properties of a ``StageTransitionProperty``
     *
     * @returns the result of the validation.
     */
    function PipelineResource_StageTransitionPropertyValidator(properties) {
        if (!cdk.canInspect(properties)) {
            return cdk.VALIDATION_SUCCESS;
        }
        const errors = new cdk.ValidationResults();
        errors.collect(cdk.propertyValidator('reason', cdk.requiredValidator)(properties.reason));
        errors.collect(cdk.propertyValidator('reason', cdk.validateString)(properties.reason));
        errors.collect(cdk.propertyValidator('stageName', cdk.requiredValidator)(properties.stageName));
        errors.collect(cdk.propertyValidator('stageName', cdk.validateString)(properties.stageName));
        return errors.wrap('supplied properties not correct for "StageTransitionProperty"');
    }
    /**
     * Renders the AWS CloudFormation properties of an ``AWS::CodePipeline::Pipeline.StageTransition`` resource
     *
     * @param properties the TypeScript properties of a ``StageTransitionProperty``
     *
     * @returns the AWS CloudFormation properties of an ``AWS::CodePipeline::Pipeline.StageTransition`` resource.
     */
    function pipelineResourceStageTransitionPropertyToCloudFormation(properties) {
        if (!cdk.canInspect(properties)) {
            return properties;
        }
        PipelineResource_StageTransitionPropertyValidator(properties).assertSuccess();
        return {
            Reason: cdk.stringToCloudFormation(properties.reason),
            StageName: cdk.stringToCloudFormation(properties.stageName),
        };
    }
})(cloudformation = exports.cloudformation || (exports.cloudformation = {}));
//# sourceMappingURL=data:application/json;base64, 