// generated from terraform resource schema
import * as cdktf from 'cdktf';
export function cloudwatchEventTargetBatchTargetToTerraform(struct) {
    if (!cdktf.canInspect(struct) || cdktf.Tokenization.isResolvable(struct)) {
        return struct;
    }
    if (cdktf.isComplexElement(struct)) {
        throw new Error("A complex element was used as configuration, this is not supported: https://cdk.tf/complex-object-as-configuration");
    }
    return {
        array_size: cdktf.numberToTerraform(struct.arraySize),
        job_attempts: cdktf.numberToTerraform(struct.jobAttempts),
        job_definition: cdktf.stringToTerraform(struct.jobDefinition),
        job_name: cdktf.stringToTerraform(struct.jobName),
    };
}
export class CloudwatchEventTargetBatchTargetOutputReference extends cdktf.ComplexObject {
    isEmptyObject = false;
    /**
    * @param terraformResource The parent resource
    * @param terraformAttribute The attribute on the parent resource this class is referencing
    * @param isSingleItem True if this is a block, false if it's a list
    */
    constructor(terraformResource, terraformAttribute, isSingleItem) {
        super(terraformResource, terraformAttribute, isSingleItem);
    }
    get internalValue() {
        let hasAnyValues = this.isEmptyObject;
        const internalValueResult = {};
        if (this._arraySize !== undefined) {
            hasAnyValues = true;
            internalValueResult.arraySize = this._arraySize;
        }
        if (this._jobAttempts !== undefined) {
            hasAnyValues = true;
            internalValueResult.jobAttempts = this._jobAttempts;
        }
        if (this._jobDefinition !== undefined) {
            hasAnyValues = true;
            internalValueResult.jobDefinition = this._jobDefinition;
        }
        if (this._jobName !== undefined) {
            hasAnyValues = true;
            internalValueResult.jobName = this._jobName;
        }
        return hasAnyValues ? internalValueResult : undefined;
    }
    set internalValue(value) {
        if (value === undefined) {
            this.isEmptyObject = false;
            this._arraySize = undefined;
            this._jobAttempts = undefined;
            this._jobDefinition = undefined;
            this._jobName = undefined;
        }
        else {
            this.isEmptyObject = Object.keys(value).length === 0;
            this._arraySize = value.arraySize;
            this._jobAttempts = value.jobAttempts;
            this._jobDefinition = value.jobDefinition;
            this._jobName = value.jobName;
        }
    }
    // array_size - computed: false, optional: true, required: false
    _arraySize;
    get arraySize() {
        return this.getNumberAttribute('array_size');
    }
    set arraySize(value) {
        this._arraySize = value;
    }
    resetArraySize() {
        this._arraySize = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get arraySizeInput() {
        return this._arraySize;
    }
    // job_attempts - computed: false, optional: true, required: false
    _jobAttempts;
    get jobAttempts() {
        return this.getNumberAttribute('job_attempts');
    }
    set jobAttempts(value) {
        this._jobAttempts = value;
    }
    resetJobAttempts() {
        this._jobAttempts = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get jobAttemptsInput() {
        return this._jobAttempts;
    }
    // job_definition - computed: false, optional: false, required: true
    _jobDefinition;
    get jobDefinition() {
        return this.getStringAttribute('job_definition');
    }
    set jobDefinition(value) {
        this._jobDefinition = value;
    }
    // Temporarily expose input value. Use with caution.
    get jobDefinitionInput() {
        return this._jobDefinition;
    }
    // job_name - computed: false, optional: false, required: true
    _jobName;
    get jobName() {
        return this.getStringAttribute('job_name');
    }
    set jobName(value) {
        this._jobName = value;
    }
    // Temporarily expose input value. Use with caution.
    get jobNameInput() {
        return this._jobName;
    }
}
export function cloudwatchEventTargetDeadLetterConfigToTerraform(struct) {
    if (!cdktf.canInspect(struct) || cdktf.Tokenization.isResolvable(struct)) {
        return struct;
    }
    if (cdktf.isComplexElement(struct)) {
        throw new Error("A complex element was used as configuration, this is not supported: https://cdk.tf/complex-object-as-configuration");
    }
    return {
        arn: cdktf.stringToTerraform(struct.arn),
    };
}
export class CloudwatchEventTargetDeadLetterConfigOutputReference extends cdktf.ComplexObject {
    isEmptyObject = false;
    /**
    * @param terraformResource The parent resource
    * @param terraformAttribute The attribute on the parent resource this class is referencing
    * @param isSingleItem True if this is a block, false if it's a list
    */
    constructor(terraformResource, terraformAttribute, isSingleItem) {
        super(terraformResource, terraformAttribute, isSingleItem);
    }
    get internalValue() {
        let hasAnyValues = this.isEmptyObject;
        const internalValueResult = {};
        if (this._arn !== undefined) {
            hasAnyValues = true;
            internalValueResult.arn = this._arn;
        }
        return hasAnyValues ? internalValueResult : undefined;
    }
    set internalValue(value) {
        if (value === undefined) {
            this.isEmptyObject = false;
            this._arn = undefined;
        }
        else {
            this.isEmptyObject = Object.keys(value).length === 0;
            this._arn = value.arn;
        }
    }
    // arn - computed: false, optional: true, required: false
    _arn;
    get arn() {
        return this.getStringAttribute('arn');
    }
    set arn(value) {
        this._arn = value;
    }
    resetArn() {
        this._arn = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get arnInput() {
        return this._arn;
    }
}
export function cloudwatchEventTargetEcsTargetNetworkConfigurationToTerraform(struct) {
    if (!cdktf.canInspect(struct) || cdktf.Tokenization.isResolvable(struct)) {
        return struct;
    }
    if (cdktf.isComplexElement(struct)) {
        throw new Error("A complex element was used as configuration, this is not supported: https://cdk.tf/complex-object-as-configuration");
    }
    return {
        assign_public_ip: cdktf.booleanToTerraform(struct.assignPublicIp),
        security_groups: cdktf.listMapper(cdktf.stringToTerraform)(struct.securityGroups),
        subnets: cdktf.listMapper(cdktf.stringToTerraform)(struct.subnets),
    };
}
export class CloudwatchEventTargetEcsTargetNetworkConfigurationOutputReference extends cdktf.ComplexObject {
    isEmptyObject = false;
    /**
    * @param terraformResource The parent resource
    * @param terraformAttribute The attribute on the parent resource this class is referencing
    * @param isSingleItem True if this is a block, false if it's a list
    */
    constructor(terraformResource, terraformAttribute, isSingleItem) {
        super(terraformResource, terraformAttribute, isSingleItem);
    }
    get internalValue() {
        let hasAnyValues = this.isEmptyObject;
        const internalValueResult = {};
        if (this._assignPublicIp !== undefined) {
            hasAnyValues = true;
            internalValueResult.assignPublicIp = this._assignPublicIp;
        }
        if (this._securityGroups !== undefined) {
            hasAnyValues = true;
            internalValueResult.securityGroups = this._securityGroups;
        }
        if (this._subnets !== undefined) {
            hasAnyValues = true;
            internalValueResult.subnets = this._subnets;
        }
        return hasAnyValues ? internalValueResult : undefined;
    }
    set internalValue(value) {
        if (value === undefined) {
            this.isEmptyObject = false;
            this._assignPublicIp = undefined;
            this._securityGroups = undefined;
            this._subnets = undefined;
        }
        else {
            this.isEmptyObject = Object.keys(value).length === 0;
            this._assignPublicIp = value.assignPublicIp;
            this._securityGroups = value.securityGroups;
            this._subnets = value.subnets;
        }
    }
    // assign_public_ip - computed: false, optional: true, required: false
    _assignPublicIp;
    get assignPublicIp() {
        return this.getBooleanAttribute('assign_public_ip');
    }
    set assignPublicIp(value) {
        this._assignPublicIp = value;
    }
    resetAssignPublicIp() {
        this._assignPublicIp = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get assignPublicIpInput() {
        return this._assignPublicIp;
    }
    // security_groups - computed: false, optional: true, required: false
    _securityGroups;
    get securityGroups() {
        return cdktf.Fn.tolist(this.getListAttribute('security_groups'));
    }
    set securityGroups(value) {
        this._securityGroups = value;
    }
    resetSecurityGroups() {
        this._securityGroups = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get securityGroupsInput() {
        return this._securityGroups;
    }
    // subnets - computed: false, optional: false, required: true
    _subnets;
    get subnets() {
        return cdktf.Fn.tolist(this.getListAttribute('subnets'));
    }
    set subnets(value) {
        this._subnets = value;
    }
    // Temporarily expose input value. Use with caution.
    get subnetsInput() {
        return this._subnets;
    }
}
export function cloudwatchEventTargetEcsTargetPlacementConstraintToTerraform(struct) {
    if (!cdktf.canInspect(struct) || cdktf.Tokenization.isResolvable(struct)) {
        return struct;
    }
    if (cdktf.isComplexElement(struct)) {
        throw new Error("A complex element was used as configuration, this is not supported: https://cdk.tf/complex-object-as-configuration");
    }
    return {
        expression: cdktf.stringToTerraform(struct.expression),
        type: cdktf.stringToTerraform(struct.type),
    };
}
export function cloudwatchEventTargetEcsTargetToTerraform(struct) {
    if (!cdktf.canInspect(struct) || cdktf.Tokenization.isResolvable(struct)) {
        return struct;
    }
    if (cdktf.isComplexElement(struct)) {
        throw new Error("A complex element was used as configuration, this is not supported: https://cdk.tf/complex-object-as-configuration");
    }
    return {
        enable_ecs_managed_tags: cdktf.booleanToTerraform(struct.enableEcsManagedTags),
        enable_execute_command: cdktf.booleanToTerraform(struct.enableExecuteCommand),
        group: cdktf.stringToTerraform(struct.group),
        launch_type: cdktf.stringToTerraform(struct.launchType),
        platform_version: cdktf.stringToTerraform(struct.platformVersion),
        propagate_tags: cdktf.stringToTerraform(struct.propagateTags),
        tags: cdktf.hashMapper(cdktf.stringToTerraform)(struct.tags),
        task_count: cdktf.numberToTerraform(struct.taskCount),
        task_definition_arn: cdktf.stringToTerraform(struct.taskDefinitionArn),
        network_configuration: cloudwatchEventTargetEcsTargetNetworkConfigurationToTerraform(struct.networkConfiguration),
        placement_constraint: cdktf.listMapper(cloudwatchEventTargetEcsTargetPlacementConstraintToTerraform)(struct.placementConstraint),
    };
}
export class CloudwatchEventTargetEcsTargetOutputReference extends cdktf.ComplexObject {
    isEmptyObject = false;
    /**
    * @param terraformResource The parent resource
    * @param terraformAttribute The attribute on the parent resource this class is referencing
    * @param isSingleItem True if this is a block, false if it's a list
    */
    constructor(terraformResource, terraformAttribute, isSingleItem) {
        super(terraformResource, terraformAttribute, isSingleItem);
    }
    get internalValue() {
        let hasAnyValues = this.isEmptyObject;
        const internalValueResult = {};
        if (this._enableEcsManagedTags !== undefined) {
            hasAnyValues = true;
            internalValueResult.enableEcsManagedTags = this._enableEcsManagedTags;
        }
        if (this._enableExecuteCommand !== undefined) {
            hasAnyValues = true;
            internalValueResult.enableExecuteCommand = this._enableExecuteCommand;
        }
        if (this._group !== undefined) {
            hasAnyValues = true;
            internalValueResult.group = this._group;
        }
        if (this._launchType !== undefined) {
            hasAnyValues = true;
            internalValueResult.launchType = this._launchType;
        }
        if (this._platformVersion !== undefined) {
            hasAnyValues = true;
            internalValueResult.platformVersion = this._platformVersion;
        }
        if (this._propagateTags !== undefined) {
            hasAnyValues = true;
            internalValueResult.propagateTags = this._propagateTags;
        }
        if (this._tags !== undefined) {
            hasAnyValues = true;
            internalValueResult.tags = this._tags;
        }
        if (this._taskCount !== undefined) {
            hasAnyValues = true;
            internalValueResult.taskCount = this._taskCount;
        }
        if (this._taskDefinitionArn !== undefined) {
            hasAnyValues = true;
            internalValueResult.taskDefinitionArn = this._taskDefinitionArn;
        }
        if (this._networkConfiguration?.internalValue !== undefined) {
            hasAnyValues = true;
            internalValueResult.networkConfiguration = this._networkConfiguration?.internalValue;
        }
        if (this._placementConstraint !== undefined) {
            hasAnyValues = true;
            internalValueResult.placementConstraint = this._placementConstraint;
        }
        return hasAnyValues ? internalValueResult : undefined;
    }
    set internalValue(value) {
        if (value === undefined) {
            this.isEmptyObject = false;
            this._enableEcsManagedTags = undefined;
            this._enableExecuteCommand = undefined;
            this._group = undefined;
            this._launchType = undefined;
            this._platformVersion = undefined;
            this._propagateTags = undefined;
            this._tags = undefined;
            this._taskCount = undefined;
            this._taskDefinitionArn = undefined;
            this._networkConfiguration.internalValue = undefined;
            this._placementConstraint = undefined;
        }
        else {
            this.isEmptyObject = Object.keys(value).length === 0;
            this._enableEcsManagedTags = value.enableEcsManagedTags;
            this._enableExecuteCommand = value.enableExecuteCommand;
            this._group = value.group;
            this._launchType = value.launchType;
            this._platformVersion = value.platformVersion;
            this._propagateTags = value.propagateTags;
            this._tags = value.tags;
            this._taskCount = value.taskCount;
            this._taskDefinitionArn = value.taskDefinitionArn;
            this._networkConfiguration.internalValue = value.networkConfiguration;
            this._placementConstraint = value.placementConstraint;
        }
    }
    // enable_ecs_managed_tags - computed: false, optional: true, required: false
    _enableEcsManagedTags;
    get enableEcsManagedTags() {
        return this.getBooleanAttribute('enable_ecs_managed_tags');
    }
    set enableEcsManagedTags(value) {
        this._enableEcsManagedTags = value;
    }
    resetEnableEcsManagedTags() {
        this._enableEcsManagedTags = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get enableEcsManagedTagsInput() {
        return this._enableEcsManagedTags;
    }
    // enable_execute_command - computed: false, optional: true, required: false
    _enableExecuteCommand;
    get enableExecuteCommand() {
        return this.getBooleanAttribute('enable_execute_command');
    }
    set enableExecuteCommand(value) {
        this._enableExecuteCommand = value;
    }
    resetEnableExecuteCommand() {
        this._enableExecuteCommand = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get enableExecuteCommandInput() {
        return this._enableExecuteCommand;
    }
    // group - computed: false, optional: true, required: false
    _group;
    get group() {
        return this.getStringAttribute('group');
    }
    set group(value) {
        this._group = value;
    }
    resetGroup() {
        this._group = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get groupInput() {
        return this._group;
    }
    // launch_type - computed: false, optional: true, required: false
    _launchType;
    get launchType() {
        return this.getStringAttribute('launch_type');
    }
    set launchType(value) {
        this._launchType = value;
    }
    resetLaunchType() {
        this._launchType = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get launchTypeInput() {
        return this._launchType;
    }
    // platform_version - computed: false, optional: true, required: false
    _platformVersion;
    get platformVersion() {
        return this.getStringAttribute('platform_version');
    }
    set platformVersion(value) {
        this._platformVersion = value;
    }
    resetPlatformVersion() {
        this._platformVersion = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get platformVersionInput() {
        return this._platformVersion;
    }
    // propagate_tags - computed: false, optional: true, required: false
    _propagateTags;
    get propagateTags() {
        return this.getStringAttribute('propagate_tags');
    }
    set propagateTags(value) {
        this._propagateTags = value;
    }
    resetPropagateTags() {
        this._propagateTags = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get propagateTagsInput() {
        return this._propagateTags;
    }
    // tags - computed: false, optional: true, required: false
    _tags;
    get tags() {
        return this.getStringMapAttribute('tags');
    }
    set tags(value) {
        this._tags = value;
    }
    resetTags() {
        this._tags = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get tagsInput() {
        return this._tags;
    }
    // task_count - computed: false, optional: true, required: false
    _taskCount;
    get taskCount() {
        return this.getNumberAttribute('task_count');
    }
    set taskCount(value) {
        this._taskCount = value;
    }
    resetTaskCount() {
        this._taskCount = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get taskCountInput() {
        return this._taskCount;
    }
    // task_definition_arn - computed: false, optional: false, required: true
    _taskDefinitionArn;
    get taskDefinitionArn() {
        return this.getStringAttribute('task_definition_arn');
    }
    set taskDefinitionArn(value) {
        this._taskDefinitionArn = value;
    }
    // Temporarily expose input value. Use with caution.
    get taskDefinitionArnInput() {
        return this._taskDefinitionArn;
    }
    // network_configuration - computed: false, optional: true, required: false
    _networkConfiguration = new CloudwatchEventTargetEcsTargetNetworkConfigurationOutputReference(this, "network_configuration", true);
    get networkConfiguration() {
        return this._networkConfiguration;
    }
    putNetworkConfiguration(value) {
        this._networkConfiguration.internalValue = value;
    }
    resetNetworkConfiguration() {
        this._networkConfiguration.internalValue = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get networkConfigurationInput() {
        return this._networkConfiguration.internalValue;
    }
    // placement_constraint - computed: false, optional: true, required: false
    _placementConstraint;
    get placementConstraint() {
        // Getting the computed value is not yet implemented
        return cdktf.Token.asAny(cdktf.Fn.tolist(this.interpolationForAttribute('placement_constraint')));
    }
    set placementConstraint(value) {
        this._placementConstraint = value;
    }
    resetPlacementConstraint() {
        this._placementConstraint = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get placementConstraintInput() {
        return this._placementConstraint;
    }
}
export function cloudwatchEventTargetHttpTargetToTerraform(struct) {
    if (!cdktf.canInspect(struct) || cdktf.Tokenization.isResolvable(struct)) {
        return struct;
    }
    if (cdktf.isComplexElement(struct)) {
        throw new Error("A complex element was used as configuration, this is not supported: https://cdk.tf/complex-object-as-configuration");
    }
    return {
        header_parameters: cdktf.hashMapper(cdktf.stringToTerraform)(struct.headerParameters),
        path_parameter_values: cdktf.listMapper(cdktf.stringToTerraform)(struct.pathParameterValues),
        query_string_parameters: cdktf.hashMapper(cdktf.stringToTerraform)(struct.queryStringParameters),
    };
}
export class CloudwatchEventTargetHttpTargetOutputReference extends cdktf.ComplexObject {
    isEmptyObject = false;
    /**
    * @param terraformResource The parent resource
    * @param terraformAttribute The attribute on the parent resource this class is referencing
    * @param isSingleItem True if this is a block, false if it's a list
    */
    constructor(terraformResource, terraformAttribute, isSingleItem) {
        super(terraformResource, terraformAttribute, isSingleItem);
    }
    get internalValue() {
        let hasAnyValues = this.isEmptyObject;
        const internalValueResult = {};
        if (this._headerParameters !== undefined) {
            hasAnyValues = true;
            internalValueResult.headerParameters = this._headerParameters;
        }
        if (this._pathParameterValues !== undefined) {
            hasAnyValues = true;
            internalValueResult.pathParameterValues = this._pathParameterValues;
        }
        if (this._queryStringParameters !== undefined) {
            hasAnyValues = true;
            internalValueResult.queryStringParameters = this._queryStringParameters;
        }
        return hasAnyValues ? internalValueResult : undefined;
    }
    set internalValue(value) {
        if (value === undefined) {
            this.isEmptyObject = false;
            this._headerParameters = undefined;
            this._pathParameterValues = undefined;
            this._queryStringParameters = undefined;
        }
        else {
            this.isEmptyObject = Object.keys(value).length === 0;
            this._headerParameters = value.headerParameters;
            this._pathParameterValues = value.pathParameterValues;
            this._queryStringParameters = value.queryStringParameters;
        }
    }
    // header_parameters - computed: false, optional: true, required: false
    _headerParameters;
    get headerParameters() {
        return this.getStringMapAttribute('header_parameters');
    }
    set headerParameters(value) {
        this._headerParameters = value;
    }
    resetHeaderParameters() {
        this._headerParameters = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get headerParametersInput() {
        return this._headerParameters;
    }
    // path_parameter_values - computed: false, optional: true, required: false
    _pathParameterValues;
    get pathParameterValues() {
        return this.getListAttribute('path_parameter_values');
    }
    set pathParameterValues(value) {
        this._pathParameterValues = value;
    }
    resetPathParameterValues() {
        this._pathParameterValues = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get pathParameterValuesInput() {
        return this._pathParameterValues;
    }
    // query_string_parameters - computed: false, optional: true, required: false
    _queryStringParameters;
    get queryStringParameters() {
        return this.getStringMapAttribute('query_string_parameters');
    }
    set queryStringParameters(value) {
        this._queryStringParameters = value;
    }
    resetQueryStringParameters() {
        this._queryStringParameters = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get queryStringParametersInput() {
        return this._queryStringParameters;
    }
}
export function cloudwatchEventTargetInputTransformerToTerraform(struct) {
    if (!cdktf.canInspect(struct) || cdktf.Tokenization.isResolvable(struct)) {
        return struct;
    }
    if (cdktf.isComplexElement(struct)) {
        throw new Error("A complex element was used as configuration, this is not supported: https://cdk.tf/complex-object-as-configuration");
    }
    return {
        input_paths: cdktf.hashMapper(cdktf.stringToTerraform)(struct.inputPaths),
        input_template: cdktf.stringToTerraform(struct.inputTemplate),
    };
}
export class CloudwatchEventTargetInputTransformerOutputReference extends cdktf.ComplexObject {
    isEmptyObject = false;
    /**
    * @param terraformResource The parent resource
    * @param terraformAttribute The attribute on the parent resource this class is referencing
    * @param isSingleItem True if this is a block, false if it's a list
    */
    constructor(terraformResource, terraformAttribute, isSingleItem) {
        super(terraformResource, terraformAttribute, isSingleItem);
    }
    get internalValue() {
        let hasAnyValues = this.isEmptyObject;
        const internalValueResult = {};
        if (this._inputPaths !== undefined) {
            hasAnyValues = true;
            internalValueResult.inputPaths = this._inputPaths;
        }
        if (this._inputTemplate !== undefined) {
            hasAnyValues = true;
            internalValueResult.inputTemplate = this._inputTemplate;
        }
        return hasAnyValues ? internalValueResult : undefined;
    }
    set internalValue(value) {
        if (value === undefined) {
            this.isEmptyObject = false;
            this._inputPaths = undefined;
            this._inputTemplate = undefined;
        }
        else {
            this.isEmptyObject = Object.keys(value).length === 0;
            this._inputPaths = value.inputPaths;
            this._inputTemplate = value.inputTemplate;
        }
    }
    // input_paths - computed: false, optional: true, required: false
    _inputPaths;
    get inputPaths() {
        return this.getStringMapAttribute('input_paths');
    }
    set inputPaths(value) {
        this._inputPaths = value;
    }
    resetInputPaths() {
        this._inputPaths = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get inputPathsInput() {
        return this._inputPaths;
    }
    // input_template - computed: false, optional: false, required: true
    _inputTemplate;
    get inputTemplate() {
        return this.getStringAttribute('input_template');
    }
    set inputTemplate(value) {
        this._inputTemplate = value;
    }
    // Temporarily expose input value. Use with caution.
    get inputTemplateInput() {
        return this._inputTemplate;
    }
}
export function cloudwatchEventTargetKinesisTargetToTerraform(struct) {
    if (!cdktf.canInspect(struct) || cdktf.Tokenization.isResolvable(struct)) {
        return struct;
    }
    if (cdktf.isComplexElement(struct)) {
        throw new Error("A complex element was used as configuration, this is not supported: https://cdk.tf/complex-object-as-configuration");
    }
    return {
        partition_key_path: cdktf.stringToTerraform(struct.partitionKeyPath),
    };
}
export class CloudwatchEventTargetKinesisTargetOutputReference extends cdktf.ComplexObject {
    isEmptyObject = false;
    /**
    * @param terraformResource The parent resource
    * @param terraformAttribute The attribute on the parent resource this class is referencing
    * @param isSingleItem True if this is a block, false if it's a list
    */
    constructor(terraformResource, terraformAttribute, isSingleItem) {
        super(terraformResource, terraformAttribute, isSingleItem);
    }
    get internalValue() {
        let hasAnyValues = this.isEmptyObject;
        const internalValueResult = {};
        if (this._partitionKeyPath !== undefined) {
            hasAnyValues = true;
            internalValueResult.partitionKeyPath = this._partitionKeyPath;
        }
        return hasAnyValues ? internalValueResult : undefined;
    }
    set internalValue(value) {
        if (value === undefined) {
            this.isEmptyObject = false;
            this._partitionKeyPath = undefined;
        }
        else {
            this.isEmptyObject = Object.keys(value).length === 0;
            this._partitionKeyPath = value.partitionKeyPath;
        }
    }
    // partition_key_path - computed: false, optional: true, required: false
    _partitionKeyPath;
    get partitionKeyPath() {
        return this.getStringAttribute('partition_key_path');
    }
    set partitionKeyPath(value) {
        this._partitionKeyPath = value;
    }
    resetPartitionKeyPath() {
        this._partitionKeyPath = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get partitionKeyPathInput() {
        return this._partitionKeyPath;
    }
}
export function cloudwatchEventTargetRedshiftTargetToTerraform(struct) {
    if (!cdktf.canInspect(struct) || cdktf.Tokenization.isResolvable(struct)) {
        return struct;
    }
    if (cdktf.isComplexElement(struct)) {
        throw new Error("A complex element was used as configuration, this is not supported: https://cdk.tf/complex-object-as-configuration");
    }
    return {
        database: cdktf.stringToTerraform(struct.database),
        db_user: cdktf.stringToTerraform(struct.dbUser),
        secrets_manager_arn: cdktf.stringToTerraform(struct.secretsManagerArn),
        sql: cdktf.stringToTerraform(struct.sql),
        statement_name: cdktf.stringToTerraform(struct.statementName),
        with_event: cdktf.booleanToTerraform(struct.withEvent),
    };
}
export class CloudwatchEventTargetRedshiftTargetOutputReference extends cdktf.ComplexObject {
    isEmptyObject = false;
    /**
    * @param terraformResource The parent resource
    * @param terraformAttribute The attribute on the parent resource this class is referencing
    * @param isSingleItem True if this is a block, false if it's a list
    */
    constructor(terraformResource, terraformAttribute, isSingleItem) {
        super(terraformResource, terraformAttribute, isSingleItem);
    }
    get internalValue() {
        let hasAnyValues = this.isEmptyObject;
        const internalValueResult = {};
        if (this._database !== undefined) {
            hasAnyValues = true;
            internalValueResult.database = this._database;
        }
        if (this._dbUser !== undefined) {
            hasAnyValues = true;
            internalValueResult.dbUser = this._dbUser;
        }
        if (this._secretsManagerArn !== undefined) {
            hasAnyValues = true;
            internalValueResult.secretsManagerArn = this._secretsManagerArn;
        }
        if (this._sql !== undefined) {
            hasAnyValues = true;
            internalValueResult.sql = this._sql;
        }
        if (this._statementName !== undefined) {
            hasAnyValues = true;
            internalValueResult.statementName = this._statementName;
        }
        if (this._withEvent !== undefined) {
            hasAnyValues = true;
            internalValueResult.withEvent = this._withEvent;
        }
        return hasAnyValues ? internalValueResult : undefined;
    }
    set internalValue(value) {
        if (value === undefined) {
            this.isEmptyObject = false;
            this._database = undefined;
            this._dbUser = undefined;
            this._secretsManagerArn = undefined;
            this._sql = undefined;
            this._statementName = undefined;
            this._withEvent = undefined;
        }
        else {
            this.isEmptyObject = Object.keys(value).length === 0;
            this._database = value.database;
            this._dbUser = value.dbUser;
            this._secretsManagerArn = value.secretsManagerArn;
            this._sql = value.sql;
            this._statementName = value.statementName;
            this._withEvent = value.withEvent;
        }
    }
    // database - computed: false, optional: false, required: true
    _database;
    get database() {
        return this.getStringAttribute('database');
    }
    set database(value) {
        this._database = value;
    }
    // Temporarily expose input value. Use with caution.
    get databaseInput() {
        return this._database;
    }
    // db_user - computed: false, optional: true, required: false
    _dbUser;
    get dbUser() {
        return this.getStringAttribute('db_user');
    }
    set dbUser(value) {
        this._dbUser = value;
    }
    resetDbUser() {
        this._dbUser = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get dbUserInput() {
        return this._dbUser;
    }
    // secrets_manager_arn - computed: false, optional: true, required: false
    _secretsManagerArn;
    get secretsManagerArn() {
        return this.getStringAttribute('secrets_manager_arn');
    }
    set secretsManagerArn(value) {
        this._secretsManagerArn = value;
    }
    resetSecretsManagerArn() {
        this._secretsManagerArn = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get secretsManagerArnInput() {
        return this._secretsManagerArn;
    }
    // sql - computed: false, optional: true, required: false
    _sql;
    get sql() {
        return this.getStringAttribute('sql');
    }
    set sql(value) {
        this._sql = value;
    }
    resetSql() {
        this._sql = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get sqlInput() {
        return this._sql;
    }
    // statement_name - computed: false, optional: true, required: false
    _statementName;
    get statementName() {
        return this.getStringAttribute('statement_name');
    }
    set statementName(value) {
        this._statementName = value;
    }
    resetStatementName() {
        this._statementName = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get statementNameInput() {
        return this._statementName;
    }
    // with_event - computed: false, optional: true, required: false
    _withEvent;
    get withEvent() {
        return this.getBooleanAttribute('with_event');
    }
    set withEvent(value) {
        this._withEvent = value;
    }
    resetWithEvent() {
        this._withEvent = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get withEventInput() {
        return this._withEvent;
    }
}
export function cloudwatchEventTargetRetryPolicyToTerraform(struct) {
    if (!cdktf.canInspect(struct) || cdktf.Tokenization.isResolvable(struct)) {
        return struct;
    }
    if (cdktf.isComplexElement(struct)) {
        throw new Error("A complex element was used as configuration, this is not supported: https://cdk.tf/complex-object-as-configuration");
    }
    return {
        maximum_event_age_in_seconds: cdktf.numberToTerraform(struct.maximumEventAgeInSeconds),
        maximum_retry_attempts: cdktf.numberToTerraform(struct.maximumRetryAttempts),
    };
}
export class CloudwatchEventTargetRetryPolicyOutputReference extends cdktf.ComplexObject {
    isEmptyObject = false;
    /**
    * @param terraformResource The parent resource
    * @param terraformAttribute The attribute on the parent resource this class is referencing
    * @param isSingleItem True if this is a block, false if it's a list
    */
    constructor(terraformResource, terraformAttribute, isSingleItem) {
        super(terraformResource, terraformAttribute, isSingleItem);
    }
    get internalValue() {
        let hasAnyValues = this.isEmptyObject;
        const internalValueResult = {};
        if (this._maximumEventAgeInSeconds !== undefined) {
            hasAnyValues = true;
            internalValueResult.maximumEventAgeInSeconds = this._maximumEventAgeInSeconds;
        }
        if (this._maximumRetryAttempts !== undefined) {
            hasAnyValues = true;
            internalValueResult.maximumRetryAttempts = this._maximumRetryAttempts;
        }
        return hasAnyValues ? internalValueResult : undefined;
    }
    set internalValue(value) {
        if (value === undefined) {
            this.isEmptyObject = false;
            this._maximumEventAgeInSeconds = undefined;
            this._maximumRetryAttempts = undefined;
        }
        else {
            this.isEmptyObject = Object.keys(value).length === 0;
            this._maximumEventAgeInSeconds = value.maximumEventAgeInSeconds;
            this._maximumRetryAttempts = value.maximumRetryAttempts;
        }
    }
    // maximum_event_age_in_seconds - computed: false, optional: true, required: false
    _maximumEventAgeInSeconds;
    get maximumEventAgeInSeconds() {
        return this.getNumberAttribute('maximum_event_age_in_seconds');
    }
    set maximumEventAgeInSeconds(value) {
        this._maximumEventAgeInSeconds = value;
    }
    resetMaximumEventAgeInSeconds() {
        this._maximumEventAgeInSeconds = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get maximumEventAgeInSecondsInput() {
        return this._maximumEventAgeInSeconds;
    }
    // maximum_retry_attempts - computed: false, optional: true, required: false
    _maximumRetryAttempts;
    get maximumRetryAttempts() {
        return this.getNumberAttribute('maximum_retry_attempts');
    }
    set maximumRetryAttempts(value) {
        this._maximumRetryAttempts = value;
    }
    resetMaximumRetryAttempts() {
        this._maximumRetryAttempts = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get maximumRetryAttemptsInput() {
        return this._maximumRetryAttempts;
    }
}
export function cloudwatchEventTargetRunCommandTargetsToTerraform(struct) {
    if (!cdktf.canInspect(struct) || cdktf.Tokenization.isResolvable(struct)) {
        return struct;
    }
    if (cdktf.isComplexElement(struct)) {
        throw new Error("A complex element was used as configuration, this is not supported: https://cdk.tf/complex-object-as-configuration");
    }
    return {
        key: cdktf.stringToTerraform(struct.key),
        values: cdktf.listMapper(cdktf.stringToTerraform)(struct.values),
    };
}
export function cloudwatchEventTargetSqsTargetToTerraform(struct) {
    if (!cdktf.canInspect(struct) || cdktf.Tokenization.isResolvable(struct)) {
        return struct;
    }
    if (cdktf.isComplexElement(struct)) {
        throw new Error("A complex element was used as configuration, this is not supported: https://cdk.tf/complex-object-as-configuration");
    }
    return {
        message_group_id: cdktf.stringToTerraform(struct.messageGroupId),
    };
}
export class CloudwatchEventTargetSqsTargetOutputReference extends cdktf.ComplexObject {
    isEmptyObject = false;
    /**
    * @param terraformResource The parent resource
    * @param terraformAttribute The attribute on the parent resource this class is referencing
    * @param isSingleItem True if this is a block, false if it's a list
    */
    constructor(terraformResource, terraformAttribute, isSingleItem) {
        super(terraformResource, terraformAttribute, isSingleItem);
    }
    get internalValue() {
        let hasAnyValues = this.isEmptyObject;
        const internalValueResult = {};
        if (this._messageGroupId !== undefined) {
            hasAnyValues = true;
            internalValueResult.messageGroupId = this._messageGroupId;
        }
        return hasAnyValues ? internalValueResult : undefined;
    }
    set internalValue(value) {
        if (value === undefined) {
            this.isEmptyObject = false;
            this._messageGroupId = undefined;
        }
        else {
            this.isEmptyObject = Object.keys(value).length === 0;
            this._messageGroupId = value.messageGroupId;
        }
    }
    // message_group_id - computed: false, optional: true, required: false
    _messageGroupId;
    get messageGroupId() {
        return this.getStringAttribute('message_group_id');
    }
    set messageGroupId(value) {
        this._messageGroupId = value;
    }
    resetMessageGroupId() {
        this._messageGroupId = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get messageGroupIdInput() {
        return this._messageGroupId;
    }
}
/**
* Represents a {@link https://www.terraform.io/docs/providers/aws/r/cloudwatch_event_target aws_cloudwatch_event_target}
*/
export class CloudwatchEventTarget extends cdktf.TerraformResource {
    // =================
    // STATIC PROPERTIES
    // =================
    static tfResourceType = "aws_cloudwatch_event_target";
    // ===========
    // INITIALIZER
    // ===========
    /**
    * Create a new {@link https://www.terraform.io/docs/providers/aws/r/cloudwatch_event_target aws_cloudwatch_event_target} Resource
    *
    * @param scope The scope in which to define this construct
    * @param id The scoped construct ID. Must be unique amongst siblings in the same scope
    * @param options CloudwatchEventTargetConfig
    */
    constructor(scope, id, config) {
        super(scope, id, {
            terraformResourceType: 'aws_cloudwatch_event_target',
            terraformGeneratorMetadata: {
                providerName: 'aws'
            },
            provider: config.provider,
            dependsOn: config.dependsOn,
            count: config.count,
            lifecycle: config.lifecycle
        });
        this._arn = config.arn;
        this._eventBusName = config.eventBusName;
        this._input = config.input;
        this._inputPath = config.inputPath;
        this._roleArn = config.roleArn;
        this._rule = config.rule;
        this._targetId = config.targetId;
        this._batchTarget.internalValue = config.batchTarget;
        this._deadLetterConfig.internalValue = config.deadLetterConfig;
        this._ecsTarget.internalValue = config.ecsTarget;
        this._httpTarget.internalValue = config.httpTarget;
        this._inputTransformer.internalValue = config.inputTransformer;
        this._kinesisTarget.internalValue = config.kinesisTarget;
        this._redshiftTarget.internalValue = config.redshiftTarget;
        this._retryPolicy.internalValue = config.retryPolicy;
        this._runCommandTargets = config.runCommandTargets;
        this._sqsTarget.internalValue = config.sqsTarget;
    }
    // ==========
    // ATTRIBUTES
    // ==========
    // arn - computed: false, optional: false, required: true
    _arn;
    get arn() {
        return this.getStringAttribute('arn');
    }
    set arn(value) {
        this._arn = value;
    }
    // Temporarily expose input value. Use with caution.
    get arnInput() {
        return this._arn;
    }
    // event_bus_name - computed: false, optional: true, required: false
    _eventBusName;
    get eventBusName() {
        return this.getStringAttribute('event_bus_name');
    }
    set eventBusName(value) {
        this._eventBusName = value;
    }
    resetEventBusName() {
        this._eventBusName = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get eventBusNameInput() {
        return this._eventBusName;
    }
    // id - computed: true, optional: true, required: false
    get id() {
        return this.getStringAttribute('id');
    }
    // input - computed: false, optional: true, required: false
    _input;
    get input() {
        return this.getStringAttribute('input');
    }
    set input(value) {
        this._input = value;
    }
    resetInput() {
        this._input = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get inputInput() {
        return this._input;
    }
    // input_path - computed: false, optional: true, required: false
    _inputPath;
    get inputPath() {
        return this.getStringAttribute('input_path');
    }
    set inputPath(value) {
        this._inputPath = value;
    }
    resetInputPath() {
        this._inputPath = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get inputPathInput() {
        return this._inputPath;
    }
    // role_arn - computed: false, optional: true, required: false
    _roleArn;
    get roleArn() {
        return this.getStringAttribute('role_arn');
    }
    set roleArn(value) {
        this._roleArn = value;
    }
    resetRoleArn() {
        this._roleArn = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get roleArnInput() {
        return this._roleArn;
    }
    // rule - computed: false, optional: false, required: true
    _rule;
    get rule() {
        return this.getStringAttribute('rule');
    }
    set rule(value) {
        this._rule = value;
    }
    // Temporarily expose input value. Use with caution.
    get ruleInput() {
        return this._rule;
    }
    // target_id - computed: true, optional: true, required: false
    _targetId;
    get targetId() {
        return this.getStringAttribute('target_id');
    }
    set targetId(value) {
        this._targetId = value;
    }
    resetTargetId() {
        this._targetId = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get targetIdInput() {
        return this._targetId;
    }
    // batch_target - computed: false, optional: true, required: false
    _batchTarget = new CloudwatchEventTargetBatchTargetOutputReference(this, "batch_target", true);
    get batchTarget() {
        return this._batchTarget;
    }
    putBatchTarget(value) {
        this._batchTarget.internalValue = value;
    }
    resetBatchTarget() {
        this._batchTarget.internalValue = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get batchTargetInput() {
        return this._batchTarget.internalValue;
    }
    // dead_letter_config - computed: false, optional: true, required: false
    _deadLetterConfig = new CloudwatchEventTargetDeadLetterConfigOutputReference(this, "dead_letter_config", true);
    get deadLetterConfig() {
        return this._deadLetterConfig;
    }
    putDeadLetterConfig(value) {
        this._deadLetterConfig.internalValue = value;
    }
    resetDeadLetterConfig() {
        this._deadLetterConfig.internalValue = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get deadLetterConfigInput() {
        return this._deadLetterConfig.internalValue;
    }
    // ecs_target - computed: false, optional: true, required: false
    _ecsTarget = new CloudwatchEventTargetEcsTargetOutputReference(this, "ecs_target", true);
    get ecsTarget() {
        return this._ecsTarget;
    }
    putEcsTarget(value) {
        this._ecsTarget.internalValue = value;
    }
    resetEcsTarget() {
        this._ecsTarget.internalValue = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get ecsTargetInput() {
        return this._ecsTarget.internalValue;
    }
    // http_target - computed: false, optional: true, required: false
    _httpTarget = new CloudwatchEventTargetHttpTargetOutputReference(this, "http_target", true);
    get httpTarget() {
        return this._httpTarget;
    }
    putHttpTarget(value) {
        this._httpTarget.internalValue = value;
    }
    resetHttpTarget() {
        this._httpTarget.internalValue = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get httpTargetInput() {
        return this._httpTarget.internalValue;
    }
    // input_transformer - computed: false, optional: true, required: false
    _inputTransformer = new CloudwatchEventTargetInputTransformerOutputReference(this, "input_transformer", true);
    get inputTransformer() {
        return this._inputTransformer;
    }
    putInputTransformer(value) {
        this._inputTransformer.internalValue = value;
    }
    resetInputTransformer() {
        this._inputTransformer.internalValue = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get inputTransformerInput() {
        return this._inputTransformer.internalValue;
    }
    // kinesis_target - computed: false, optional: true, required: false
    _kinesisTarget = new CloudwatchEventTargetKinesisTargetOutputReference(this, "kinesis_target", true);
    get kinesisTarget() {
        return this._kinesisTarget;
    }
    putKinesisTarget(value) {
        this._kinesisTarget.internalValue = value;
    }
    resetKinesisTarget() {
        this._kinesisTarget.internalValue = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get kinesisTargetInput() {
        return this._kinesisTarget.internalValue;
    }
    // redshift_target - computed: false, optional: true, required: false
    _redshiftTarget = new CloudwatchEventTargetRedshiftTargetOutputReference(this, "redshift_target", true);
    get redshiftTarget() {
        return this._redshiftTarget;
    }
    putRedshiftTarget(value) {
        this._redshiftTarget.internalValue = value;
    }
    resetRedshiftTarget() {
        this._redshiftTarget.internalValue = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get redshiftTargetInput() {
        return this._redshiftTarget.internalValue;
    }
    // retry_policy - computed: false, optional: true, required: false
    _retryPolicy = new CloudwatchEventTargetRetryPolicyOutputReference(this, "retry_policy", true);
    get retryPolicy() {
        return this._retryPolicy;
    }
    putRetryPolicy(value) {
        this._retryPolicy.internalValue = value;
    }
    resetRetryPolicy() {
        this._retryPolicy.internalValue = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get retryPolicyInput() {
        return this._retryPolicy.internalValue;
    }
    // run_command_targets - computed: false, optional: true, required: false
    _runCommandTargets;
    get runCommandTargets() {
        // Getting the computed value is not yet implemented
        return this.interpolationForAttribute('run_command_targets');
    }
    set runCommandTargets(value) {
        this._runCommandTargets = value;
    }
    resetRunCommandTargets() {
        this._runCommandTargets = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get runCommandTargetsInput() {
        return this._runCommandTargets;
    }
    // sqs_target - computed: false, optional: true, required: false
    _sqsTarget = new CloudwatchEventTargetSqsTargetOutputReference(this, "sqs_target", true);
    get sqsTarget() {
        return this._sqsTarget;
    }
    putSqsTarget(value) {
        this._sqsTarget.internalValue = value;
    }
    resetSqsTarget() {
        this._sqsTarget.internalValue = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get sqsTargetInput() {
        return this._sqsTarget.internalValue;
    }
    // =========
    // SYNTHESIS
    // =========
    synthesizeAttributes() {
        return {
            arn: cdktf.stringToTerraform(this._arn),
            event_bus_name: cdktf.stringToTerraform(this._eventBusName),
            input: cdktf.stringToTerraform(this._input),
            input_path: cdktf.stringToTerraform(this._inputPath),
            role_arn: cdktf.stringToTerraform(this._roleArn),
            rule: cdktf.stringToTerraform(this._rule),
            target_id: cdktf.stringToTerraform(this._targetId),
            batch_target: cloudwatchEventTargetBatchTargetToTerraform(this._batchTarget.internalValue),
            dead_letter_config: cloudwatchEventTargetDeadLetterConfigToTerraform(this._deadLetterConfig.internalValue),
            ecs_target: cloudwatchEventTargetEcsTargetToTerraform(this._ecsTarget.internalValue),
            http_target: cloudwatchEventTargetHttpTargetToTerraform(this._httpTarget.internalValue),
            input_transformer: cloudwatchEventTargetInputTransformerToTerraform(this._inputTransformer.internalValue),
            kinesis_target: cloudwatchEventTargetKinesisTargetToTerraform(this._kinesisTarget.internalValue),
            redshift_target: cloudwatchEventTargetRedshiftTargetToTerraform(this._redshiftTarget.internalValue),
            retry_policy: cloudwatchEventTargetRetryPolicyToTerraform(this._retryPolicy.internalValue),
            run_command_targets: cdktf.listMapper(cloudwatchEventTargetRunCommandTargetsToTerraform)(this._runCommandTargets),
            sqs_target: cloudwatchEventTargetSqsTargetToTerraform(this._sqsTarget.internalValue),
        };
    }
}
//# sourceMappingURL=cloudwatch-event-target.js.map